/* === MÓDULO: COMPONENTES REUTILIZABLES === */

/* --- Tarjetas --- */
.smg-card {
    background-color: var(--smg-bg-secondary);
    border: 1px solid var(--smg-border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative; /* Añadido por si se necesita para overlays genéricos */
}
.smg-card h1, .smg-card h2, .smg-card h3, .smg-card h4 { color: var(--smg-text-primary); }
.smg-card p, .smg-card .description, .smg-card .form-table th, .smg-card .form-table label { color: var(--smg-text-secondary); }
.smg-card .form-table td, .smg-card .form-table strong { color: var(--smg-text-primary); }

.smg-pro-locked-setting {
    opacity: 0.6;
}

.smg-pro-locked-setting select[disabled] {
    background: var(--smg-bg-primary);
    color: var(--smg-text-secondary);
    border-color: var(--smg-border-color);
    cursor: not-allowed;
}

.smg-pro-locked-setting-note {
    display: block;
    margin-top: 6px;
}

.smg-pro-locked-settings-summary {
    margin-top: 8px;
}

/* --- Barra de Progreso --- */
.smg-progress-bar-container {
    background-color: var(--smg-bg-primary);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    height: 22px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid var(--smg-border-color);
}
.smg-progress-bar {
    background-color: var(--smg-accent-fuchsia);
    background-image: none;
    height: 100%;
    line-height: 22px;
    color: white;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    transition: width 0.6s ease;
    white-space: nowrap;
    overflow: hidden;
}
.smg-progress-bar span {
    padding: 0 5px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* --- Botones Genéricos --- */
.smg-button-gradient,
.smg-action-button-gradient { /* Estilo base para botones primarios fucsia */
    background-image: none;
    background-color: #ff4d75;
    box-shadow: var(--smg-accent-shadow);
    color: white !important; /* Asegurar texto blanco */
    border: none;
    padding: 10px 25px;
    border-radius: var(--smg-border-radius);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none; /* Quitar subrayado si se aplica a <a> */
}
.smg-button-gradient:hover,
.smg-action-button-gradient:hover {
    background-color: #ff4d75;
    box-shadow: 0 8px 25px -3px rgba(247, 52, 94, 0.55);
    transform: translateY(-2px);
    color: white !important;
}
/* Botones pequeños redondos */
.smg-action-button-gradient {
    border-radius: 50%;
    width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
}
.smg-action-button-gradient .dashicons {
    font-size: 16px;
    margin: 0;
    line-height: 1;
    height: 16px;
}
/* Botones secundarios (borde azul oscuro) */
.smg-action-button-neutral,
#smg-test-api-key,
#smg-add-rule-button,
.smg-card a.button:not(.button-primary):not(.smg-button-gradient):not(.smg-kofi-button), /* Selectores más específicos */
.smg-regenerate-button,
.smg-regenerate-image-button,
.wp-core-ui .smg-modern-wrap .button-secondary:not(.smg-filter-button):not(#smg-cancel-bulk-action) /* Estilo para button-secondary genérico dentro del plugin */

{

    font-weight: bold !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
    padding: 6px 16px;
    height: auto;
    line-height: normal;
    text-decoration: none;
}
.smg-action-button-neutral:hover,
#smg-test-api-key:hover,
#smg-add-rule-button:hover,
.smg-card a.button:not(.button-primary):not(.smg-button-gradient):not(.smg-kofi-button):hover,
.smg-regenerate-button:hover,
.smg-regenerate-image-button:hover,
.wp-core-ui .smg-modern-wrap .button-secondary:not(.smg-filter-button):not(#smg-cancel-bulk-action):hover
{
    background: var(--smg-accent-dark-blue) !important;
    color: white !important;
}
/* Botones neutrales pequeños redondos */
.smg-action-button-neutral {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
}
/* Filtros */
.smg-filter-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.smg-filter-button {
    background-color: var(--smg-bg-secondary);
    border: 1px solid var(--smg-border-color);
    color: var(--smg-text-secondary);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 6px;
}
.smg-filter-button:hover {
    border-color: var(--smg-accent-fuchsia);
    color: var(--smg-text-primary);
}
.smg-filter-button.active {
    background-image: none;
    background-color: var(--smg-accent-fuchsia);
    border-color: transparent;
    color: white;
    box-shadow: var(--smg-accent-shadow);
}
/* Botones específicos de acciones (Apply, Save, etc.) */
#smg-doaction,
.smg-autopilot-card .button-primary,
form[method="post"] button[name="smg-import_submit"],
.smg-modal-footer .smg-modal-save /* Añadido aquí */
{
    background-color: var(--smg-accent-fuchsia) !important;
    background-image: none !important;
    box-shadow: var(--smg-accent-shadow) !important;
    border: none !important;
    color: white !important;
    font-weight: bold !important;
    transition: all 0.3s ease;
    padding: 8px 18px;
    height: auto;
}
#smg-doaction { padding: 6px 16px !important; } /* Ajuste específico */
#smg-doaction:hover,
.smg-autopilot-card .button-primary:hover,
form[method="post"] button[name="smg-import_submit"]:hover,
.smg-modal-footer .smg-modal-save:hover /* Añadido aquí */
{
    background-color: #ff4d75 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -3px rgba(247, 52, 94, 0.55) !important;
}


/* --- Tablas --- */
.wp-list-table {
    background-color: var(--smg-bg-secondary);
    border: 1px solid var(--smg-border-color);
}
.wp-list-table, .wp-list-table th, .wp-list-table td { color: var(--smg-text-primary); }
.wp-list-table thead th, .wp-list-table tfoot th { border-bottom-color: var(--smg-border-color); background-color: var(--smg-bg-primary); }
.wp-list-table tbody tr:not(.no-items) { background-color: var(--smg-bg-secondary); }
.wp-list-table tbody tr.alternate { background-color: var(--smg-bg-primary); }
.wp-list-table tbody td { border-bottom-color: var(--smg-border-color); }
/* Estilo base para enlaces en tablas (se puede sobreescribir en módulos específicos) */
.wp-list-table tbody td a {
    color: var(--smg-accent-dark-blue);
    font-weight: bold;
    text-decoration: none;
}
.wp-list-table tbody td a:hover {
    color: var(--smg-accent-fuchsia);
    text-decoration: underline;
}
.check-column { border-left-color: var(--smg-border-color) !important; }
.smg-actions-cell { text-align: right !important; white-space: nowrap; }
.smg-actions-cell button, .smg-actions-cell a.button { margin-left: 4px; vertical-align: middle; }
.smg-wrap .wp-list-table .dashicons { line-height: inherit; }
th.sortable a { display: block; padding: 0; text-decoration: none; color: inherit; }
th.sortable a:focus { box-shadow: none; }
th.sortable .sorting-indicator {
    display: inline-block; visibility: visible; width: 1em; height: 1em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23787c82'%3E%3Cpath fill-rule='evenodd' d='M10 3a.75.75 0 01.75.75v10.5a.75.75 0 01-1.5 0V3.75A.75.75 0 0110 3z' clip-rule='evenodd' /%3E%3Cpath d='M6.22 8.22a.75.75 0 010 1.06l-3 3a.75.75 0 01-1.06-1.06l3-3a.75.75 0 011.06 0zM15.28 9.28a.75.75 0 01-1.06 0l-3-3a.75.75 0 011.06-1.06l3 3a.75.75 0 010 1.06z' /%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center center; background-size: 14px 14px;
    vertical-align: middle; opacity: 0.5;
}
th.sortable:hover .sorting-indicator { opacity: 1; }
th.sortable.sorted .sorting-indicator { opacity: 1; }
th.sortable.asc .sorting-indicator { transform: rotate(180deg); }

/* --- Paginación --- */
.tablenav.bottom { border-top-color: var(--smg-border-color); }
.tablenav-pages .displaying-num { color: var(--smg-text-secondary); }
.tablenav-pages .pagination-links { display: inline-flex; gap: 5px; }
.tablenav-pages .page-numbers {
    text-decoration: none;
    border: 1px solid var(--smg-border-color);
    background: var(--smg-bg-secondary);
    color: var(--smg-accent-blue);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}
.tablenav-pages a.page-numbers:hover {
    border-color: var(--smg-accent-blue);
    background: var(--smg-bg-primary);
    color: var(--smg-accent-blue);
}
.tablenav-pages .page-numbers.current {
    background: var(--smg-accent-blue);
    border-color: var(--smg-accent-blue);
    color: white;
    cursor: default;
}

/* === INICIO: Estilos para Link Stats (Reutilizable) === */
.smg-link-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--smg-text-secondary);
}
.smg-link-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.smg-link-stats .dashicons {
    font-size: 18px;
    height: 18px;
    width: 18px;
    vertical-align: middle;
}
/* === FIN: Estilos para Link Stats === */

/* === INICIO: PRO Label (Reutilizable) === */
.smg-pro-label {
    display: inline-block;
    background-color: var(--smg-accent-blue);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 5px;
}
/* === FIN: PRO Label === */

/* ========================================================================= */
/* SOBREESCRITURAS PARA MODO OSCURO (Solo Generales) */
/* ========================================================================= */
.smg-dark-theme .smg-card,
.smg-dark-theme .wp-list-table,
.smg-dark-theme .form-table {
    color: var(--smg-text-secondary);
}
.smg-dark-theme .smg-card h1,
.smg-dark-theme .smg-card h2,
.smg-dark-theme .smg-card h3,
.smg-dark-theme .wp-list-table th,
.smg-dark-theme .form-table th,
.smg-dark-theme .form-table strong,
.smg-dark-theme .wp-list-table tbody td a { /* Enlace genérico tabla modo oscuro */
    color: var(--smg-text-primary);
}
/* Botones secundarios modo oscuro */
.smg-dark-theme .smg-action-button-neutral,
.smg-dark-theme #smg-test-api-key,
.smg-dark-theme #smg-add-rule-button,
.smg-dark-theme .smg-card a.button:not(.button-primary):not(.smg-button-gradient):not(.smg-kofi-button),
.smg-dark-theme .smg-regenerate-button,
.smg-dark-theme .smg-regenerate-image-button,
.smg-dark-theme .wp-core-ui .smg-modern-wrap .button-secondary:not(.smg-filter-button):not(#smg-cancel-bulk-action)
{
    border-color: var(--smg-text-secondary) !important;
    color: var(--smg-text-secondary) !important;
    background: transparent !important;
}
.smg-dark-theme .smg-action-button-neutral:hover,
.smg-dark-theme #smg-test-api-key:hover,
.smg-dark-theme #smg-add-rule-button:hover,
.smg-dark-theme .smg-card a.button:not(.button-primary):not(.smg-button-gradient):not(.smg-kofi-button):hover,
.smg-dark-theme .smg-regenerate-button:hover,
.smg-dark-theme .smg-regenerate-image-button:hover,
.smg-dark-theme .wp-core-ui .smg-modern-wrap .button-secondary:not(.smg-filter-button):not(#smg-cancel-bulk-action):hover
{
    border-color: var(--smg-text-primary) !important;
    color: var(--smg-text-primary) !important;
    background: #2D3748 !important;
}
/* Paginación modo oscuro */
.smg-dark-theme .tablenav-pages .page-numbers {
    border-color: #4A5568;
}
.smg-dark-theme .tablenav-pages a.page-numbers:hover {
    border-color: var(--smg-accent-blue);
}

/* === INICIO: Footer Banner (Reutilizable) === */
.smg-footer-banner {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    background-color: var(--smg-bg-secondary);
    border: 1px solid var(--smg-border-color);
    border-radius: var(--smg-border-radius);
    font-size: 14px;
    color: var(--smg-text-secondary);
}
.smg-footer-banner a.smg-footer-stars {
    text-decoration: none !important;
    color: #ffb900;
    transition: transform 0.2s ease;
    display: inline-block;
    margin: 0 5px;
}
.smg-footer-banner a.smg-footer-stars:hover {
    transform: scale(1.1);
}
.smg-footer-banner .dashicons {
    font-size: 18px;
    height: 18px;
    width: 18px;
    vertical-align: middle;
}


/* Estilo base para tarjetas PRO */
.smg-pro-feature-card {
    background-color: #f6f9ff; /* Celeste muy claro */
    border: 2px dashed var(--smg-accent-blue) !important; /* Borde punteado azul */
    padding: 25px; /* Asegurar padding consistente */
    margin-bottom: 25px; /* Asegurar margen consistente */
    border-radius: var(--smg-border-radius);
    position: relative; /* Para el label PRO si se posiciona absoluto */
}

/* Adaptación para modo oscuro */
.smg-dark-theme .smg-pro-feature-card {
    background-color: rgba(114, 164, 242, 0.05); /* Fondo azul muy transparente */
    border-color: rgba(114, 164, 242, 0.5) !important; /* Borde azul más transparente */
}

/* Asegurar que el label PRO sea visible */
.smg-pro-feature-card .smg-pro-label {
    /* Estilos existentes para smg-pro-label */
}

/* Make Link Assistant PRO card span full width under content */
#smg-main-wrapper .smg-link-assistant-card,
#smg-assistant-tab .smg-link-assistant-card {
  grid-column: 1 / -1;
  margin-top: 0;
}
#smg-assistant-tab .smg-content-grid,
#smg-assistant-tab .smg-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
}

/* Footer rating banner */
.smg-footer-rating {
  width: 100%;
  padding: 0;
  margin: 28px 0 12px;
}
.smg-footer-rating__inner {
  max-width: 1120px;            /* mismo ancho visual que el resto */
  margin: 0 auto;
  padding: 12px 16px;
  text-align: center;
  font-size: 14.5px;
  background: #f8fafc;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.04);
}
.smg-footer-rating__stars {
  text-decoration: none;
  margin: 0 8px;
  color: #f5a623;
  font-size: 20px;
}
.smg-footer-rating__dismiss {
  margin-left: 12px;
  color: #6c7a89;
}

#smg-seo-checklist hr { display: none !important; }
#smg-seo-checklist li#check-subheading-dist { border-bottom: 0 !important; }


/* Botón del Link Assistant con estilo del plugin */
#smg-link-assistant,
.smg-link-assistant-widget,
.smg-link-assistant-widget .smg-la-analyze {
  position: relative;
  z-index: 200 !important;
  pointer-events: auto;
}

#smg-link-assistant .smg-la-analyze {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  font-weight: 700;
  background: #F7345E !important;
  border: none;
  color: #fff;
  box-shadow: 0 8px 30px rgba(255,77,109,.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
#smg-link-assistant .smg-la-analyze:hover {
  filter: brightness(1.03);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -3px rgba(247, 52, 94, 0.55);
}
#smg-link-assistant .smg-la-analyze:disabled,
#smg-link-assistant .smg-la-analyze[disabled] {
  background: #d6dbe3 !important;
  color: #7d8794 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  filter: none !important;
}
#smg-link-assistant .smg-la-loader {
  display: none;
  margin-top: 10px;
  color: var(--smg-text-secondary);
}

/* Asegurar que la grilla del Assistant fluya y no deje hueco enorme */
#smg-assistant-tab .smg-content-grid {
  align-items: start;                 /* cada columna crece con su contenido */
  grid-template-columns: 1fr 420px;   /* editor = 1fr, aside = fijo */
}

/* Si el editor tiene altura mínima grande, la bajamos */
#smg-assistant-tab .smg-editor-wrap {
  min-height: auto;
}

/* (plan B) Hacer que el editor ocupe todo el ancho cuando la columna derecha quede corta */
@media (max-width: 1500px) {
  #smg-assistant-tab .smg-content-grid { grid-template-columns: 1fr; }
  #smg-link-assistant { grid-column: 1 / -1; }
}



/* === INICIO: CORRECCIÓN LAYOUT ASISTENTE (SOBREESCRITURAS) === */

/* Asegurar que el contenedor principal use Flexbox y permita envolver */
#smg-assistant-main-card .smg-assistant-layout {
    display: flex !important; /* Forzar flex */
    flex-wrap: wrap !important; /* Forzar envoltura */
    gap: 25px;
    align-items: flex-start; /* Alinear items arriba */
}

/* Forzar orden y tamaño de columnas principales */
#smg-assistant-main-card .smg-assistant-main-column {
    flex: 2 1 60% !important; /* flex-grow, flex-shrink, flex-basis */
    min-width: 350px; /* Ancho mínimo razonable */
    order: 1 !important; /* Primera columna */
    position: relative !important;
    z-index: 1;
}

#smg-assistant-main-card .smg-assistant-sidebar-column {
    flex: 1 1 300px !important; /* flex-grow, flex-shrink, flex-basis */
    min-width: 300px;
    order: 2 !important; /* Segunda columna */
    position: sticky !important; /* Mantener sticky si es posible */
    top: 50px;
    align-self: flex-start;
    z-index: 150 !important;
}

#smg-assistant-main-card #smg-main-editor-container,
#smg-assistant-main-card #wp-smg-assistant-content-wrap,
#smg-assistant-main-card .tox.tox-tinymce {
    position: relative;
    z-index: 1;
}

#smg-assistant-main-card .smg-link-assistant-wrapper-card {
    position: relative;
    z-index: 25 !important;
    isolation: isolate;
}



/* Resetear reglas conflictivas de Grid de _components.css en esta página específica */
#smg-assistant-main-card .smg-content-grid,
#smg-assistant-main-card .smg-dashboard-grid {
  display: block !important; /* Cambiar de Grid a Block */
  grid-template-columns: none !important; /* Resetear columnas */
}

/* Resetear media query conflictiva */
@media (max-width: 1500px) {
  #smg-assistant-tab .smg-content-grid {
      /* Dejar la regla original por si se usa en otro lado, pero sobreescribimos abajo */
  }
  #smg-assistant-main-card .smg-assistant-layout {
      /* Opcional: Apilar columnas en pantallas más pequeñas */
      /* flex-direction: column; */
  }
  #smg-assistant-main-card #smg-link-assistant {
      grid-column: auto !important; /* Resetear grid-column */
  }
}


/* ===== LINK ASSISTANT – estilos sin tocar el HTML ===== */
/* Aplicar estilos al contenedor que SÍ existe */
#smg-link-assistant .smg-la-group {
    border-bottom: 1px solid var(--smg-border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}
#smg-link-assistant .smg-la-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Título del grupo (K-Dramas, Netflix, etc.) */
#smg-link-assistant .smg-la-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: var(--smg-text-secondary);
}

/* Título de tipo (Internal, External) */
#smg-link-assistant .smg-la-group > div[style*="font-weight:600"] {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--smg-text-primary);
    margin-bottom: 5px;
}

/* La lista de links */
#smg-link-assistant .smg-la-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 10px;
    border-left: 3px solid var(--smg-bg-primary);
}

/* Cada item (link + botón) */
#smg-link-assistant .smg-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* El link */
#smg-link-assistant .smg-item a {
    font-weight: 600;
    text-decoration: none;
    color: var(--smg-accent-blue);
    flex-grow: 1; /* Ocupa el espacio disponible */
    word-break: break-word; /* Evita desbordes */
}
#smg-link-assistant .smg-item.smg-item--internal a {
    color: var(--smg-accent-blue) !important;
}
#smg-link-assistant .smg-item.smg-item--external a {
    color: var(--smg-accent-fuchsia) !important;
}
#smg-link-assistant .smg-link-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: text-bottom;
}
#smg-link-assistant .smg-item.smg-item--external .smg-link-icon {
    color: var(--smg-accent-fuchsia) !important;
}
#smg-link-assistant .smg-item a:hover {
    text-decoration: underline;
}

/* El botón de Insertar */
#smg-link-assistant .smg-insert-btn {
    background: var(--smg-accent-blue) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 4px 12px !important;
    height: auto !important;
    line-height: 1.5 !important;
    cursor: pointer;
    flex-shrink: 0; /* Evita que el botón se encoja */
}
#smg-link-assistant .smg-insert-btn:hover {
    background: #0a58ca !important; /* Un azul un poco más oscuro */
}
#smg-link-assistant .smg-insert-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

/* Modo Oscuro */
.smg-dark-theme #smg-link-assistant .smg-la-title {
    color: var(--smg-text-secondary);
}
.smg-dark-theme #smg-link-assistant .smg-la-group > div[style*="font-weight:600"] {
    color: var(--smg-text-primary);
}
.smg-dark-theme #smg-link-assistant .smg-la-list {
    border-left-color: var(--smg-border-color);
}
.smg-dark-theme #smg-link-assistant .smg-item a {
    color: var(--smg-accent-blue-light);
}



/* === INICIO: Keyword Suggestion Pills === */
#smg-secondary-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.smg-keyword-pill {
    background-color: var(--smg-bg-primary);
    border: 1px solid var(--smg-border-color);
    color: var(--smg-text-secondary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.smg-keyword-pill:hover {
    background-color: var(--smg-accent-blue);
    border-color: var(--smg-accent-blue);
    color: white;
}
.smg-dark-theme .smg-keyword-pill:hover {
    background-color: var(--smg-accent-blue-light);
    border-color: var(--smg-accent-blue-light);
    color: var(--smg-bg-primary);
}
/* === FIN: Keyword Suggestion Pills === */

/* ==========================================================================
   INICIO: ESTILOS GLOBALES MOVIDOS DE ARCHIVOS JS
   (Para auto-linking.js, backlink-audit.js, media-table.js, modal.js, 
   posts-table.js, request-queue.js)
   ========================================================================== */

/* --- Estilos genéricos de estado de tabla --- */
.smg-table-loading,
.smg-table-no-results {
    text-align: center;
    color: var(--smg-text-secondary);
}
.smg-table-no-results.smg-error-text {
    color: var(--smg-error-color, red);
}
.smg-table-no-results--padded {
    padding: 20px;
}

/* --- Spinner --- */
.smg-spinner-inline {
    float: none;
    margin-right: 5px;
    vertical-align: middle;
}

/* --- Botón de insertar (estado) --- */
.smg-insert-link-button.is-inserted,
.smg-insert-custom-link-button.is-inserted {
    background-color: #4caf50 !important;
    border-color: #4caf50 !important;
    color: #fff !important;
}

/* --- Miniatura de la tabla de Medios --- */
.smg-media-table-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* --- Barra de Progreso en Tablas (Estados) --- */
.smg-progress-bar.is-generating {
    background-image: none;
    background-color: #5b92e5;
    width: 100%;
}
.smg-progress-bar.is-on-hold {
    background-image: none;
    background-color: #ffb900;
    width: 100%;
}
.smg-progress-bar.is-error {
    background-image: none;
    background-color: #f44336;
    width: 100%;
}

/* --- Texto de error (Modal) --- */
.smg-error-text {
    color: var(--smg-error-color, red);
}

/* ==========================================================================
   INICIO: FIX ALINEACIÓN TABLA "Metadata SEO" (page-renderer.php)
   ========================================================================== */

/* 1. Definir anchos de cabecera */
#smg-posts-table th.check-column {
    width: 2.2em; /* Ancho estándar de WP para checkboxes */
}
#smg-posts-table th:nth-child(2) { /* Columna ID */
    width: 5%;
}
#smg-posts-table th:nth-child(4) { /* Columna SEO Coverage */
    width: 30%;
}
#smg-posts-table th:nth-child(5) { /* Columna Actions */
    width: 15%;
}

/* 2. Definir anchos de celdas (aunque suelen heredar, esto lo asegura) */
#smg-posts-table td:nth-child(2) { width: 5%; }
#smg-posts-table td:nth-child(4) { width: 30%; }
#smg-posts-table td:nth-child(5) { width: 15%; }


/* === FIN: FIX ALINEACIÓN TABLA === */

#smg-posts-table tr .smg-col-actions{
	text-align:right !important;
	
}


/* ==========================================================================
   INICIO: FIX ALINEACIÓN TABLA "Multimedia SEO" (page-renderer.php)
   ========================================================================== */

/* 1. Definir anchos de cabecera */
#smg-media-table th:nth-child(2) { /* Columna Thumbnail */
    width: 10%;
}
#smg-media-table th[data-sort-by="coverage"] { /* Columna SEO Coverage */
    width: 30%;
}
#smg-media-table th:last-child { /* Columna Actions */
    width: 15%;
}

/* 2. Definir anchos de celdas (para asegurar consistencia) */
#smg-media-table td:nth-child(2) { width: 10%; }
#smg-media-table td:nth-child(4) { width: 30%; }
#smg-media-table td.smg-actions-cell { width: 15%; }

/* === FIN: FIX ALINEACIÓN TABLA === */

/* Site Health: estilos del progress bar usados por el JS */
.smg-progress-track {
  background-color: var(--smg-bg-primary);
  border: 1px solid var(--smg-border-color);
  border-radius: 9999px;
  overflow: hidden;
  height: 22px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.smg-progress-track .smg-progress-bar {
  background-color: var(--smg-accent-fuchsia); /* el rosa del plugin */
  height: 100%;
  transition: width .25s ease;
}
