/* -----------------------------------------------------------------------------
   BASE CONTAINERS
   ----------------------------------------------------------------------------- */
#wrapper-id,
.wscraper-container {
  max-width: 95% !important;
  width: 95% !important;
}

body.toplevel_page_wooscraper .wrap {
  max-width: 100% !important;
  padding: 0 20px;
}

/* -----------------------------------------------------------------------------
   GLOBAL BUTTON STYLES
   ----------------------------------------------------------------------------- */
    .wscraper-accordion {
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 1em;
    }
    .wscraper-accordion .question {
        background: #f7f7f7;
        cursor: pointer;
        padding: 12px;
        font-weight: bold;
        position: relative;
    }
    .wscraper-accordion .question:after {
        content: '\25BC';
        position: absolute;
        right: 16px;
        transition: transform 0.3s ease;
    }
    .wscraper-accordion .question.active:after {
        transform: rotate(-180deg);
    }
    .wscraper-accordion .answer {
        display: none;
        padding: 12px;
        background: #fff;
        border-top: 1px solid #ddd;
    }
    .wscraper-howto-wrap p a {
        color: #0073aa;
        text-decoration: underline;
    }
.plan {
  display: block;
  width: max-content;
  margin: 1.5rem auto;
  padding: 0.75rem 1.5rem;
  background-color: #ff5722;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s, transform 0.1s;
}
.plan:hover {
  background-color: #e64a19;
  transform: translateY(-2px);
}
#wscraper-login-google {
  display: inline-block;
  margin: 20px 0;
  padding: 10px 24px;
  font-size: 16px;
  background-color: #ff5722;
  color: #fff;
  float: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.warning {
  align-items: center;
  background-color: #fff3cd; /* fondo amarillo claro */
  border: 1px solid #ffeeba; /* borde amarillo */
  color: #856404; /* texto marrón oscuro */
  padding: 12px 16px;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 16px;
  width: 50%;
  margin: auto;
  text-align: center;
}

.warning::before {
  content: "⚠️"; /* icono de advertencia */
  margin-right: 8px;
  font-size: 1.2em;
}
button,
.wscraper-plan-link,
.wscraper-plan-button,
.wscraper-modal-button,
.wscraper-enrich-buttons {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  margin-left: 20px !important;
  margin-right: 20px;
}
button:hover,
.wscraper-plan-link:hover,
.wscraper-plan-button:hover,
.wscraper-modal-button:hover,
.wscraper-enrich-buttons:hover {
  transform: scale(1.02);
}
button.btn-disabled,
button.btn-disabled:hover {
  background-color: #ccc !important;
  color: #666 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
.wscraper-enrich-buttons {
  display: inline-block;
  margin: 20px 0;
  padding: 10px 24px;
  font-size: 16px;
  background-color: #ff5722;
  color: #fff;
  float: right;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
#wscraper-enrich-pagination button.active {
  background-color: #0073aa;
  color: #fff;
  border-radius: 4px;
}

/* -----------------------------------------------------------------------------
   MODAL
   ----------------------------------------------------------------------------- */
.wscraper-modal {
  display: none;
  position: fixed;
  inset: 0;
  padding-top: 50px;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.wscraper-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.wscraper-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  background: #ff5722;
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 36px;
  cursor: pointer;
}
.wscraper-modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 16px;
}
.wscraper-modal-button {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background-color: #ff5722;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* -----------------------------------------------------------------------------
   GRID LAYOUT (máximo 4 cards por fila)
   ----------------------------------------------------------------------------- */
.wscraper-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(4, 1fr);
}

/* -----------------------------------------------------------------------------
   LOADER
   ----------------------------------------------------------------------------- */
#enrich-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10000;
}
#enrich-loader.active {
  display: flex !important;
}
#enrich-loader-text {
  font-family: "Inter", sans-serif;
  color: #333;
  font-size: 1.4rem;
  margin-bottom: 1em;
}
#enrich-loader .spinner {
  border: 4px solid #eee;
  border-top: 4px solid #333;
  border-radius: 50%;
  width: 3em;
  height: 3em;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#enrich-complete-ok {
  margin-top: 1em;
  padding: 0.6em 1.2em;
  background-color: #ff5722;
  color: #fff;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
}

/* -----------------------------------------------------------------------------
   USER INFO CARD
   ----------------------------------------------------------------------------- */
.wscraper-user-info .user-card {
  background: #fff;
  border-radius: 12px;
  width: 40%;
  min-width: 280px;
  margin: 0 auto 20px;
  border-left: 6px solid #ff5722;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.user-card-header {
  padding: 1rem 1.5rem;
  background: linear-gradient(90deg, #ff8a50, #ff5722);
  color: #fff;
  text-align: center;
}
.user-card-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}
.user-card-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.user-field {
  display: flex;
  justify-content: space-between;
  font-family: "Inter", sans-serif;
}
.field-label {
  color: #666;
  font-weight: 500;
}
.field-value {
  color: #333;
  font-weight: 600;
}
.user-field.tokens .field-value {
  background: #ff5722;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  min-width: 3rem;
  text-align: center;
}
.user-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}
.plan-btn {
  background: none;
  border: 2px solid #ff5722;
  color: #ff5722;
  text-decoration: none;
  padding: 7px 10px 0 10px;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}
.plan-btn:hover {
  background-color: #ff5722;
  color: #fff;
}
.logout-btn {
  background: none;
  border: 2px solid #ff5722;
  color: #ff5722;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  transition: background-color 0.2s, color 0.2s;
}
.logout-btn:hover {
  background-color: #ff5722;
  color: #fff;
}
.wscraper-signature {
  text-align: center;
  font-weight: bold;
}
.wscraper-accordion {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 1em;
}
.wscraper-accordion .question {
  background: #f7f7f7;
  cursor: pointer;
  padding: 12px;
  font-weight: bold;
  position: relative;
}
.wscraper-accordion .question:after {
  content: "\25BC";
  position: absolute;
  right: 16px;
  transition: transform 0.3s ease;
}
.wscraper-accordion .question.active:after {
  transform: rotate(-180deg);
}
.wscraper-accordion .answer {
  display: none;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #ddd;
}
.wscraper-howto-wrap p a {
  color: #0073aa;
  text-decoration: underline;
}
.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
}
#wscraper-enrich-basic:disabled,
#wscraper-enrich-premium:disabled {
  background-color: #8a8a8a;
  color: #eee;
  border-color: #666;
  cursor: not-allowed;
  opacity: 0.8;
}

/* ----------------- OVERLAY ----------------- */
#enrich-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10000;
}
#enrich-loader.active {
  display: flex !important;
}
#enrich-loader-text {
  font-family: 'Inter', sans-serif;
  color: #333;
  font-size: 1.4rem;
  margin-bottom: 1em;
}
#enrich-loader .spinner {
  border: 4px solid #eee;
  border-top: 4px solid #333;
  border-radius: 50%;
  width: 3em;
  height: 3em;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#enrich-complete-ok {
  margin-top: 1em;
  padding: 0.6em 1.2em;
  background-color: #ff5722;
  color: #fff;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

/* -----------------------------------------------------------------------------
   NAV BUTTONS
   ----------------------------------------------------------------------------- */
.wscraper-nav-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.wscraper-big-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #ff5722;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s, transform 0.1s;
}
.wscraper-big-btn:hover {
  background-color: #e64a19;
  transform: translateY(-2px);
}

/* -----------------------------------------------------------------------------
   RESPONSIVE TWEAKS
   ----------------------------------------------------------------------------- */
@media (max-width: 800px) {
  .wscraper-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .plan-btn {
    background: none;
    border: 2px solid #ff5722;
    color: #ff5722;
    text-decoration: none;
    padding: 7px 10px 0 10px;
    border-radius: 6px;
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
    max-width: 81%;
  }
  .wscraper-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .wscraper-user-info .user-card {
    width: 90%;
    margin-bottom: 16px;
  }
  .user-card-body,
  .user-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .plan,
  .wscraper-plan-button,
  .wscraper-enrich-buttons,
  .wscraper-big-btn {
    width: 100% !important;
    text-align: center;
    margin: 0 auto 12px;
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  /* tablas scroll solo en móvil */
  .widefat {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .widefat th,
  .widefat td {
    white-space: nowrap;
    word-break: keep-all;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  #enrich-loader-text {
    font-size: 1.2rem;
  }
}
