/* --- GW ANALYTICS ADMIN MAIN STYLES --- */

/* Pestañas de Navegación */
.gw-nav-tab-wrapper { margin-bottom: 20px; background: #fff; padding: 15px 20px; border-bottom: 1px solid #e5e5e5; display: flex; align-items: center; gap: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.gw-nav-tab { text-decoration: none; padding: 10px 20px; font-size: 14px; font-weight: 600; color: #555; border-radius: 4px; transition: all 0.2s; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 8px; }
.gw-nav-tab:hover { background: #f0f0f1; color: #2271b1; }
.gw-nav-tab.nav-tab-active { background: #2271b1; color: #fff; border-color: #2271b1; }
.gw-nav-tab .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* --- TUTORIAL REDISEÑADO --- */
.gw-tutorial-wrap { max-width: 1000px; margin: 40px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #3c434a; }

/* Hero Section */
.gw-tutorial-hero { text-align: center; margin-bottom: 50px; background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid #eef0f2; }
.gw-tutorial-hero h2 { font-size: 32px; margin: 0 0 15px 0; color: #1d2327; font-weight: 800; letter-spacing: -0.5px; }
.gw-tutorial-hero p { font-size: 18px; color: #646970; max-width: 700px; margin: 0 auto; line-height: 1.5; }

/* Tarjetas de Pasos */
.gw-step-card { background: #fff; border: 1px solid #dcdcde; border-radius: 12px; overflow: hidden; margin-bottom: 40px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); transition: transform 0.2s, box-shadow 0.2s; }
.gw-step-card:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0,0,0,0.08); }

.gw-step-header { padding: 25px 30px; border-bottom: 1px solid #f0f0f1; display: flex; gap: 20px; align-items: flex-start; background: #fafafa; }
.gw-step-badge { background: #e01d75; color: #fff; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; flex-shrink: 0; margin-top: 2px; }
.gw-step-title h3 { margin: 0 0 8px 0; font-size: 20px; color: #1d2327; font-weight: 700; }
.gw-step-title p { margin: 0; font-size: 15px; color: #50575e; line-height: 1.5; }

/* Área de Imagen */
.gw-step-image { padding: 30px; background: #fff; text-align: center; position: relative; }
.gw-img-placeholder {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e5e5e5;
    display: block;
    margin: 0 auto;
    /* Estilo por defecto si la imagen falla */
    min-height: 200px;
    background-color: #f0f0f1;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="%23ccc" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

/* Tabla de IDs */
.gw-table-container { overflow-x: auto; margin-top: 20px; border-radius: 8px; border: 1px solid #dcdcde; }
.gw-field-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.gw-field-table th { background: #f6f7f7; padding: 15px; text-align: left; font-weight: 700; color: #1d2327; border-bottom: 1px solid #dcdcde; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
.gw-field-table td { padding: 15px; border-bottom: 1px solid #f0f0f1; color: #50575e; vertical-align: top; }
.gw-field-table tr:last-child td { border-bottom: none; }
.gw-field-table tr:hover td { background: #fcfcfc; }

/* Cajas de Código */
code.gw-code {
    background: #24292e;
    color: #79c0ff;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    display: inline-block;
    border: 1px solid #1b1f23;
    cursor: text;
}

/* Alertas y Notas */
.gw-note { background: #f0f6fc; border-left: 4px solid #2271b1; padding: 15px 20px; border-radius: 4px; margin-top: 20px; font-size: 14px; color: #1d2327; }
.gw-note strong { color: #2271b1; }



/* Pestañas de Navegación */
.gw-nav-tab-wrapper {
    margin-bottom: 20px;
    background: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.gw-nav-tab {
    text-decoration: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    border-radius: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none !important; /* Quita el borde azul nativo del navegador */
}

/* --- ESTADOS (HOVER / FOCUS / ACTIVE) --- */

/* Hover (Pasar el ratón) y Focus (Al hacer clic, pero sin ser el activo) */
.gw-nav-tab:hover,
.gw-nav-tab:focus {
    background: #f0f0f1;
    color: #e01d75 !important; /* Fuxia */
    border-color: #e01d75 !important; /* Borde Fuxia */
    box-shadow: 0 0 0 1px #e01d75 !important; /* Simula el anillo de enfoque pero en Fuxia */
}

/* ACTIVO (Pestaña seleccionada) */
.gw-nav-tab.nav-tab-active,
.gw-nav-tab.nav-tab-active:hover,
.gw-nav-tab.nav-tab-active:focus {
    background: #e01d75 !important;
    color: #fff !important;
    border-color: #e01d75 !important;
    box-shadow: none !important; /* Quitamos el shadow en el activo para que se vea plano y limpio */
}

.gw-nav-tab .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* --- NUEVO ESTILO: ¿CÓMO FUNCIONA? (SPECTACULAR MODE) --- */

.gw-how-it-works-section {
    margin-top: 50px;
    margin-bottom: 50px;
}

.gw-hiw-header {
    text-align: center;
    margin-bottom: 40px;
}
.gw-hiw-header h3 {
    font-size: 26px;
    font-weight: 800;
    color: #1d2327;
    margin-bottom: 10px;
}
.gw-hiw-header p {
    font-size: 16px;
    color: #646970;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid de 4 Columnas */
.gw-process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

/* Tarjetas del Proceso */
.gw-process-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    border: 1px solid #f0f0f1;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Efecto Hover: Levantar y Sombra Fuxia suave */
.gw-process-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(224, 29, 117, 0.15); /* Sombra Fuxia */
    border-color: #ffeef5;
}

/* Barra superior decorativa Fuxia */
.gw-process-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: #e01d75; /* Fuxia */
    opacity: 0;
    transition: opacity 0.3s;
}
.gw-process-card:hover::before { opacity: 1; }

/* Iconos */
.gw-icon-circle {
    width: 60px;
    height: 60px;
    background: #fff0f7; /* Fuxia muy claro */
    color: #e01d75;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 28px;
    transition: transform 0.3s;
}
.gw-process-card:hover .gw-icon-circle {
    transform: scale(1.1) rotate(5deg);
    background: #e01d75;
    color: #fff;
}

.gw-process-card h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}

.gw-process-card p {
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
    margin: 0;
}

/* Conector visual (flecha) entre tarjetas en desktop */
@media (min-width: 900px) {
    .gw-process-card::after {
        content: '→';
        position: absolute;
        right: -20px;
        top: 40%;
        font-size: 20px;
        color: #ddd;
        font-weight: bold;
    }
    .gw-process-card:last-child::after { display: none; }
    .gw-process-grid { overflow: visible; }
}

/* --- GW SETTINGS PREMIUM UI --- */

:root {
    --gw-brand: #e01d75; /* Tu color Fuxia */
    --gw-brand-soft: #fff0f7;
    --gw-text-main: #1d2327;
    --gw-text-sec: #646970;
    --gw-border: #dcdcde;
    --gw-card-bg: #ffffff;
    --gw-input-bg: #f8f9fa;
    --gw-focus: rgba(224, 29, 117, 0.15);
}

.gw-settings-container {
    max-width: 900px;
    margin: 20px auto 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Cabecera */
.gw-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}
.gw-settings-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gw-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tarjetas */
.gw-card {
    background: var(--gw-card-bg);
    border: 1px solid var(--gw-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.gw-card:hover {
    box-shadow: 0 6px 25px rgba(0,0,0,0.06);
}

.gw-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gw-text-main);
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gw-card-title .dashicons {
    color: var(--gw-brand);
    background: var(--gw-brand-soft);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.gw-card-desc {
    font-size: 13px;
    color: var(--gw-text-sec);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Inputs Modernos */
.gw-input-group {
    margin-bottom: 20px;
}
.gw-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gw-text-sec);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.gw-input, .gw-textarea, .gw-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gw-border);
    border-radius: 8px;
    background: var(--gw-input-bg);
    color: var(--gw-text-main);
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.gw-input:focus, .gw-textarea:focus, .gw-select:focus {
    border-color: var(--gw-brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--gw-focus);
    outline: none;
}

.gw-helper {
    font-size: 12px;
    color: #8c8f94;
    margin-top: 6px;
    display: block;
}

/* Grid para opciones pequeñas */
.gw-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
@media (max-width: 700px) { .gw-grid-2 { grid-template-columns: 1fr; } }

/* Toggle Switch (Estilo iOS) */
.gw-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.gw-toggle input { opacity: 0; width: 0; height: 0; }
.gw-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}
.gw-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .gw-slider { background-color: var(--gw-brand); }
input:checked + .gw-slider:before { transform: translateX(20px); }

.gw-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 15px;
    border: 1px solid var(--gw-border);
    border-radius: 8px;
    transition: border-color 0.2s;
}
.gw-toggle-row:hover { border-color: #b0b0b5; }

/* Botón Guardar Flotante o Hero */
.gw-save-bar {
    background: #fff;
    padding: 20px 30px;
    border-top: 1px solid var(--gw-border);
    display: flex;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    margin-top: 40px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    border-radius: 0 0 12px 12px;
    z-index: 100;
}

.gw-btn-primary {
    background: var(--gw-text-main); /* Negro elegante o Fuxia */
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.gw-btn-primary:hover {
    background: var(--gw-brand);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(224, 29, 117, 0.3);
}

/* Badges */
.gw-badge {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
}
/* --- CORRECCIONES DARK MODE PARA TUTORIAL Y AJUSTES --- */

body.efa-dark-mode .gw-tutorial-hero,
body.efa-dark-mode .gw-step-card,
body.efa-dark-mode .gw-settings-container .gw-card,
body.efa-dark-mode .gw-save-bar {
    background-color: #1f2940 !important; /* Fondo de tarjeta oscuro */
    border-color: #3a3a5e !important;
    color: #e0e0e0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
}

/* Textos y Títulos */
body.efa-dark-mode .gw-step-title h3,
body.efa-dark-mode .gw-card-title,
body.efa-dark-mode .gw-settings-header h2 {
    color: #ffffff !important;
}

body.efa-dark-mode .gw-step-title p,
body.efa-dark-mode .gw-tutorial-hero p,
body.efa-dark-mode .gw-card-desc {
    color: #a0a0c0 !important;
}

/* Cabeceras de los pasos (gris claro en light -> oscuro en dark) */
body.efa-dark-mode .gw-step-header {
    background-color: #26334d !important;
    border-bottom-color: #3a3a5e !important;
}

/* Área de imagen */
body.efa-dark-mode .gw-step-image {
    background-color: #141b2d !important; /* Fondo muy oscuro para que resalte la imagen */
}

/* Tablas dentro del tutorial */
body.efa-dark-mode .gw-field-table th {
    background-color: #2a2a3e !important;
    color: #ffffff !important;
    border-bottom-color: #3a3a5e !important;
}
body.efa-dark-mode .gw-field-table td {
    background-color: #1f2940 !important;
    color: #a0a0c0 !important;
    border-bottom-color: #3a3a5e !important;
}
body.efa-dark-mode .gw-field-table tr:hover td {
    background-color: #26334d !important;
}

/* Notas y Cajas de Código */
body.efa-dark-mode .gw-note {
    background-color: rgba(34, 113, 177, 0.2) !important;
    color: #b0d6ff !important;
    border-left-color: #72aee6 !important;
}
body.efa-dark-mode .gw-note strong {
    color: #fff !important;
}
body.efa-dark-mode code.gw-code {
    border-color: #555 !important;
}

/* Inputs en Ajustes (para que no se vean blancos brillantes) */
body.efa-dark-mode .gw-input,
body.efa-dark-mode .gw-textarea,
body.efa-dark-mode .gw-select {
    background-color: #141b2d !important;
    border-color: #3a3a5e !important;
    color: #fff !important;
}
body.efa-dark-mode .gw-input:focus,
body.efa-dark-mode .gw-textarea:focus,
body.efa-dark-mode .gw-select:focus {
    border-color: #e01d75 !important; /* Tu fuxia */
    box-shadow: 0 0 0 2px rgba(224, 29, 117, 0.25) !important;
}

/* Toggles en Dark Mode */
body.efa-dark-mode .gw-toggle-row {
    background-color: #1f2940 !important;
    border-color: #3a3a5e !important;
    color: #e0e0e0 !important;
}
body.efa-dark-mode .gw-slider {
    background-color: #4a4a6a !important;
}
body.efa-dark-mode input:checked + .gw-slider {
    background-color: #e01d75 !important; /* Fuxia activo */
}

/* Footer del Tutorial */
body.efa-dark-mode .gw-tutorial-hero[style*="background: #f0f6fc"] {
    background-color: #1a2336 !important;
    border-color: #3a3a5e !important;
}
/* Corrección para el título del Hero en Dark Mode */
body.efa-dark-mode .gw-tutorial-hero h2 {
    color: #ffffff !important;
}
/* --- CORRECCIONES FINALES DE DISEÑO (FUXIA & DARK MODE) --- */

/* 1. Título "Configuración en 4 Pasos" (Ahora blanco brillante) */
body.efa-dark-mode .gw-tutorial-hero h2 {
    color: #ffffff !important;
}

/* 2. Pestañas del Menú ACTIVAS (Forzar Fuxia en vez de Azul) */
body.efa-dark-mode .gw-nav-tab.nav-tab-active {
    background-color: #e01d75 !important; /* Fuxia Corporativo */
    border-color: #e01d75 !important;
    color: #ffffff !important;
}

/* 3. Pestañas del Menú HOVER (Texto Fuxia al pasar el ratón) */
body.efa-dark-mode .gw-nav-tab:hover {
    color: #e01d75 !important;
    background-color: #2a2a3e !important; /* Fondo oscuro suave */
}

/* 4. Iconos de los pasos (1, 2, 3...) en Dark Mode */
body.efa-dark-mode .gw-step-badge {
    background-color: #e01d75 !important;
    color: #fff !important;
}
/* --- MEJORA DEL MENÚ SUPERIOR --- */

.gw-nav-tab-wrapper {
    display: flex !important; /* Aseguramos flex */
    align-items: center;
    gap: 10px;
    padding-right: 20px; /* Espacio al final */
}

/* Esto empuja el último elemento (el botón Dark Mode) a la derecha del todo */
.gw-nav-tab-wrapper > #efa-theme-toggle {
    margin-left: auto !important;
}

/* Ajuste para que el botón se vea bien en el menú */
.gw-nav-tab-wrapper #efa-theme-toggle {
    background: #fff;
    border: 1px solid #dcdcde;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* En Dark Mode, ajustar el fondo del botón del menú */
body.efa-dark-mode .gw-nav-tab-wrapper #efa-theme-toggle {
    background: #2a2a3e;
    border-color: #3a3a5e;
    color: #fff;
}
/* --- CORRECCIONES DE TEXTO EN AJUSTES (DARK MODE) --- */

/* 1. Títulos de los campos (Ej: AUTO-LIMPIEZA DE SPAM) */
body.efa-dark-mode .gw-label {
    color: #ffffff !important; /* Blanco brillante */
}

/* 2. Textos de ayuda (Ej: Borrar spam antiguo...) */
body.efa-dark-mode .gw-helper {
    color: #a0a0c0 !important; /* Gris claro */
}

/* 3. Textos al lado de inputs (Ej: "Días", "Ocultar pestaña") */
body.efa-dark-mode .gw-input-group span,
body.efa-dark-mode .gw-toggle-row span {
    color: #e0e0e0 !important; /* Blanco suave */
}
