/* tour.v1.css — estilos del boton flotante "?" y del popover de driver.js */

#pagetour-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 4px 12px rgba(99, 102, 241, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    z-index: 9990;
}
#pagetour-btn:hover {
    transform: translateY(-2px) scale(1.05);
    background: #4f46e5;
    box-shadow:
        0 6px 18px rgba(79, 70, 229, 0.45),
        0 3px 6px rgba(0, 0, 0, 0.1);
}
#pagetour-btn:active {
    transform: translateY(0) scale(0.98);
}
#pagetour-btn svg {
    width: 22px;
    height: 22px;
}

/* Popover personalizado */
.pagetour-popover.driver-popover {
    background: #ffffff;
    color: #111827;
    border-radius: 12px;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 16px 18px;
    max-width: 360px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.pagetour-popover .driver-popover-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}
.pagetour-popover .driver-popover-description {
    font-size: 13px;
    line-height: 1.55;
    color: #374151;
}
.pagetour-popover .driver-popover-footer {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.pagetour-popover .driver-popover-progress-text {
    font-size: 11px;
    font-weight: 600;
    color: #6366f1;
    letter-spacing: 0.04em;
}
.pagetour-popover .driver-popover-navigation-btns {
    display: inline-flex;
    gap: 6px;
}
.pagetour-popover .driver-popover-prev-btn,
.pagetour-popover .driver-popover-next-btn,
.pagetour-popover .driver-popover-close-btn {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #374151;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pagetour-popover .driver-popover-next-btn {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}
.pagetour-popover .driver-popover-next-btn:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}
.pagetour-popover .driver-popover-prev-btn:hover {
    background: #f3f4f6;
}
.pagetour-popover .driver-popover-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    line-height: 1;
    font-size: 16px;
    color: #6b7280;
    border-color: transparent;
}
.pagetour-popover .driver-popover-close-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Overlay de driver.js: oscurecer con tinte indigo suave */
.driver-popover-arrow {
    border-color: transparent;
}

/* Mobile: boton mas chico y mas pegado al borde */
@media (max-width: 640px) {
    #pagetour-btn {
        width: 40px;
        height: 40px;
        bottom: 16px;
        right: 16px;
    }
    .pagetour-popover.driver-popover {
        max-width: calc(100vw - 32px);
    }
}

/* ============================================
   DARK MODE — coherente con la paleta global de los hubs
   ============================================ */
html[data-theme="dark"] .pagetour-popover.driver-popover {
    background: #171a20;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.55),
        0 4px 12px rgba(0, 0, 0, 0.40);
}
html[data-theme="dark"] .pagetour-popover .driver-popover-title {
    color: #ffffff;
}
html[data-theme="dark"] .pagetour-popover .driver-popover-description {
    color: rgba(255, 255, 255, 0.78);
}
html[data-theme="dark"] .pagetour-popover .driver-popover-progress-text {
    color: #8b8eff;
}
html[data-theme="dark"] .pagetour-popover .driver-popover-prev-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.16);
}
html[data-theme="dark"] .pagetour-popover .driver-popover-prev-btn:hover {
    background: rgba(255, 255, 255, 0.10);
}
html[data-theme="dark"] .pagetour-popover .driver-popover-close-btn {
    color: rgba(255, 255, 255, 0.65);
    background: transparent;
    border-color: transparent;
}
html[data-theme="dark"] .pagetour-popover .driver-popover-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
html[data-theme="dark"] .pagetour-popover .driver-popover-arrow.driver-popover-arrow-side-bottom {
    border-bottom-color: #171a20;
}
html[data-theme="dark"] .pagetour-popover .driver-popover-arrow.driver-popover-arrow-side-top {
    border-top-color: #171a20;
}
html[data-theme="dark"] .pagetour-popover .driver-popover-arrow.driver-popover-arrow-side-left {
    border-left-color: #171a20;
}
html[data-theme="dark"] .pagetour-popover .driver-popover-arrow.driver-popover-arrow-side-right {
    border-right-color: #171a20;
}

/* Botón disabled en dark: evitar opacity:0.5 que se ve borroso → usar colores translúcidos individuales con contraste suficiente */
html[data-theme="dark"] .pagetour-popover .driver-popover-btn-disabled,
html[data-theme="dark"] .pagetour-popover .driver-popover-prev-btn:disabled,
html[data-theme="dark"] .pagetour-popover .driver-popover-next-btn:disabled {
    opacity: 1 !important;
    color: rgba(255, 255, 255, 0.55) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    cursor: not-allowed;
    text-shadow: none;
}

/* Refuerzo de nitidez en botones del tour (ambos modos): quitar text-shadow blanco heredado del panel que produce halo en light y emborrona texto en dark */
.pagetour-popover .driver-popover-prev-btn,
.pagetour-popover .driver-popover-next-btn,
.pagetour-popover .driver-popover-close-btn {
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: none !important;
}
