/**
 * TOURS CSS - Estilos para Sistema de Ayuda Interactiva
 * TapTime v1.7.114
 */

/* ============================================
   BOTÓN FLOTANTE DE AYUDA
   ============================================ */

.help-button-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary, #6366f1) 0%, var(--color-primary-dark, #4f46e5) 100%);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4),
                0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-button-floating:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5),
                0 4px 12px rgba(0, 0, 0, 0.15);
}

.help-button-floating:active {
    transform: scale(1.05);
}

.help-button-floating i {
    transition: transform 0.3s ease;
}

.help-button-floating:hover i {
    transform: rotate(15deg);
}

/* Pulso animado para llamar la atención */
.help-button-floating::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: helpPulse 2s ease-out infinite;
    z-index: -1;
}

@keyframes helpPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   MODAL DE AYUDA
   ============================================ */

.help-modal-content {
    max-width: 600px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.help-modal-content .modal-header {
    background: linear-gradient(135deg, var(--color-primary, #6366f1) 0%, var(--color-primary-dark, #4f46e5) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

.help-modal-content .modal-header h2 {
    color: white;
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.help-modal-content .modal-header h2 i {
    font-size: 1.5rem;
}

.help-modal-content .modal-close {
    color: white;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.help-modal-content .modal-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.help-modal-content .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* ============================================
   INTRO Y PROGRESO
   ============================================ */

.help-intro {
    margin-bottom: 1.5rem;
}

.help-intro p {
    color: var(--color-text-secondary, #64748b);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.help-progress {
    background: var(--color-bg-secondary, #f8fafc);
    border-radius: 12px;
    padding: 1rem;
}

.help-progress-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text, #1e293b);
    margin-bottom: 0.75rem;
}

.help-progress-text i {
    color: #f59e0b;
}

.help-progress-bar {
    height: 8px;
    background: var(--color-border, #e2e8f0);
    border-radius: 4px;
    overflow: hidden;
}

.help-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ============================================
   LISTA DE TOURS
   ============================================ */

.tours-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tour-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg, white);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.tour-card:hover {
    border-color: var(--color-primary, #6366f1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.tour-card.completed {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent);
    border-color: rgba(16, 185, 129, 0.3);
}

.tour-card-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary, #f8fafc);
    border-radius: 12px;
    flex-shrink: 0;
}

.tour-card-content {
    flex: 1;
    min-width: 0;
}

.tour-card-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text, #1e293b);
    margin: 0 0 0.25rem 0;
}

.tour-card-content p {
    font-size: 0.85rem;
    color: var(--color-text-secondary, #64748b);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.tour-card-meta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--color-text-muted, #94a3b8);
}

.tour-card-meta i {
    font-size: 0.7rem;
}

.tour-card .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================
   FOOTER DEL MODAL
   ============================================ */

.help-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
    display: flex;
    justify-content: center;
}

.help-footer .btn {
    font-size: 0.8rem;
    color: var(--color-text-secondary, #64748b);
}

/* ============================================
   OVERLAY DE BIENVENIDA
   ============================================ */

.tour-welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.tour-welcome-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
}

.tour-welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tour-welcome-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text, #1e293b);
    margin: 0 0 0.5rem 0;
}

.tour-welcome-card p {
    color: var(--color-text-secondary, #64748b);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.tour-welcome-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.tour-welcome-buttons .btn {
    min-width: 120px;
}

.tour-welcome-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary, #64748b);
    cursor: pointer;
}

.tour-welcome-checkbox input {
    accent-color: var(--color-primary, #6366f1);
}

/* ============================================
   PERSONALIZACIÓN DE SHEPHERD.JS
   ============================================ */

.shepherd-modal-overlay-container {
    z-index: 10000;
}

.shepherd-element {
    z-index: 10001;
}

/* Tema personalizado TapTime */
.shepherd-element.shepherd-has-title .shepherd-content {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 4px 20px rgba(0, 0, 0, 0.1);
}

.shepherd-element .shepherd-header {
    background: linear-gradient(135deg, var(--color-primary, #6366f1) 0%, var(--color-primary-dark, #4f46e5) 100%);
    border-radius: 16px 16px 0 0;
    padding: 1rem 1.25rem;
}

.shepherd-element .shepherd-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shepherd-element .shepherd-cancel-icon {
    color: white;
    opacity: 0.8;
}

.shepherd-element .shepherd-cancel-icon:hover {
    opacity: 1;
}

.shepherd-element .shepherd-text {
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text, #1e293b);
}

.shepherd-element .shepherd-text .step-content {
    margin-bottom: 0.75rem;
}

.shepherd-element .shepherd-text .step-progress {
    font-size: 0.8rem;
    color: var(--color-text-muted, #94a3b8);
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.shepherd-element .shepherd-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border, #e2e8f0);
    gap: 0.5rem;
}

/* Botones de Shepherd */
.shepherd-button {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.shepherd-button-primary {
    background: linear-gradient(135deg, var(--color-primary, #6366f1) 0%, var(--color-primary-dark, #4f46e5) 100%);
    color: white;
}

.shepherd-button-primary:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.shepherd-button-secondary {
    background: var(--color-bg-secondary, #f1f5f9);
    color: var(--color-text, #1e293b);
}

.shepherd-button-secondary:hover {
    background: var(--color-border, #e2e8f0);
}

.shepherd-button-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.shepherd-button-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Flecha de Shepherd */
.shepherd-arrow {
    border-color: transparent;
}

.shepherd-arrow::before {
    background: white;
}

.shepherd-element[data-popper-placement^='top'] .shepherd-arrow::before {
    border-top-color: white;
}

.shepherd-element[data-popper-placement^='bottom'] .shepherd-arrow::before {
    border-bottom-color: var(--color-primary, #6366f1);
}

.shepherd-element[data-popper-placement^='left'] .shepherd-arrow::before {
    border-left-color: white;
}

.shepherd-element[data-popper-placement^='right'] .shepherd-arrow::before {
    border-right-color: white;
}

/* Elemento destacado */
.shepherd-target-click-disabled {
    pointer-events: none !important;
}

.shepherd-enabled .shepherd-target {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3) !important;
    border-radius: 8px;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   MODO OSCURO
   ============================================ */

[data-theme="dark"] .help-modal-content .modal-body,
.dark-mode .help-modal-content .modal-body {
    background: var(--color-bg, #1e293b);
}

[data-theme="dark"] .tour-card,
.dark-mode .tour-card {
    background: var(--color-bg-secondary, #334155);
    border-color: var(--color-border, #475569);
}

[data-theme="dark"] .tour-card-icon,
.dark-mode .tour-card-icon {
    background: var(--color-bg, #1e293b);
}

[data-theme="dark"] .help-progress,
.dark-mode .help-progress {
    background: var(--color-bg, #1e293b);
}

[data-theme="dark"] .tour-welcome-card,
.dark-mode .tour-welcome-card {
    background: var(--color-bg-secondary, #334155);
}

[data-theme="dark"] .tour-welcome-card h3,
.dark-mode .tour-welcome-card h3 {
    color: white;
}

[data-theme="dark"] .shepherd-element .shepherd-content,
.dark-mode .shepherd-element .shepherd-content {
    background: var(--color-bg-secondary, #334155);
}

[data-theme="dark"] .shepherd-element .shepherd-text,
.dark-mode .shepherd-element .shepherd-text {
    color: var(--color-text, #e2e8f0);
}

[data-theme="dark"] .shepherd-button-secondary,
.dark-mode .shepherd-button-secondary {
    background: var(--color-bg, #1e293b);
    color: var(--color-text, #e2e8f0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .help-button-floating {
        width: 48px;
        height: 48px;
        bottom: 16px;
        right: 16px;
        font-size: 1.1rem;
    }

    .help-modal-content {
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }

    .tour-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .tour-card-icon {
        width: 64px;
        height: 64px;
        font-size: 2.25rem;
    }

    .tour-card .btn {
        width: 100%;
    }

    .tour-welcome-buttons {
        flex-direction: column;
    }

    .tour-welcome-buttons .btn {
        width: 100%;
    }

    .shepherd-element .shepherd-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
}
