/**
 * Tour Guide Styles
 * Estilos para el sistema de recorrido guiado interactivo
 */

/* Overlay de dimming para el tour */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tour-overlay.active {
    opacity: 1;
}

/* Highlight para el elemento actual del tour */
.tour-highlight {
    position: relative;
    z-index: 10000 !important;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7) !important;
}

/* Tooltip principal */
.tour-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #facc15;
    border-radius: 16px;
    padding: 0;
    max-width: 420px;
    min-width: 320px;
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(250, 204, 21, 0.2);
}

.tour-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Header del tooltip */
.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
    border-radius: 14px 14px 0 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
}

.tour-tooltip-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    font-family: 'Lobster', cursive;
}

/* Body del tooltip */
.tour-tooltip-body {
    padding: 24px;
}

.tour-tooltip-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #f0f0f0;
    font-family: 'Open Sans', sans-serif;
}

/* Footer del tooltip */
.tour-tooltip-footer {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 14px 14px;
    border-top: 1px solid rgba(250, 204, 21, 0.2);
}

/* Progress indicator */
.tour-progress {
    margin-bottom: 16px;
}

.tour-step-counter {
    display: block;
    font-size: 13px;
    color: #facc15;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.tour-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.tour-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #facc15 0%, #f59e0b 100%);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

/* Controls */
.tour-controls {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.tour-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Open Sans', sans-serif;
}

.tour-btn-primary {
    background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
    color: #000;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}

.tour-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(250, 204, 21, 0.4);
}

.tour-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tour-btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.tour-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Start button */
.tour-start-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
    color: #000;
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(250, 204, 21, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Open Sans', sans-serif;
    animation: tour-btn-bounce 3s ease-in-out infinite;
}

.tour-start-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(250, 204, 21, 0.6);
}

.tour-start-btn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

/* Tooltip position variants */
.tour-tooltip.position-center {
    left: 50% !important;
    top: 50% !important;
}

.tour-tooltip.position-top::before,
.tour-tooltip.position-bottom::before,
.tour-tooltip.position-left::before,
.tour-tooltip.position-right::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.tour-tooltip.position-top::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 12px 12px 12px;
    border-color: transparent transparent #facc15 transparent;
}

.tour-tooltip.position-bottom::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 12px 12px 0 12px;
    border-color: #facc15 transparent transparent transparent;
}

.tour-tooltip.position-left::before {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 12px 12px 0;
    border-color: transparent #facc15 transparent transparent;
}

.tour-tooltip.position-right::before {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 0 12px 12px;
    border-color: transparent transparent transparent #facc15;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tour-tooltip {
        max-width: 90vw;
        min-width: unset;
        left: 5vw !important;
        right: 5vw !important;
        top: auto !important;
        bottom: 20px !important;
        transform: none !important;
    }

    .tour-tooltip.position-center {
        top: 50% !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        left: 50% !important;
    }

    .tour-tooltip::before {
        display: none;
    }

    .tour-start-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }

    .tour-tooltip-title {
        font-size: 18px;
    }

    .tour-tooltip-description {
        font-size: 14px;
    }

    .tour-controls {
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .tour-tooltip-header {
        padding: 16px 20px;
    }

    .tour-tooltip-body {
        padding: 20px;
    }

    .tour-tooltip-footer {
        padding: 16px 20px;
    }

    .tour-start-btn span {
        display: none;
    }

    .tour-start-btn {
        padding: 12px;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        justify-content: center;
    }
}

/* Animation for section transitions */
@keyframes tour-section-focus {
    0% {
        transform: scale(0.98);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.tour-highlight {
    animation: tour-section-focus 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibility improvements */
.tour-btn:focus,
.tour-start-btn:focus {
    outline: 3px solid #facc15;
    outline-offset: 2px;
}

/* Ensure tour tooltip is always accessible */
.tour-tooltip {
    pointer-events: auto;
}
