/* Overlay Container */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: auto;
}

.tour-overlay.active {
    pointer-events: auto;
}

/* Backdrop - divided into 4 sections for selective blur */
.tour-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Blurred overlay sections */
.tour-blur-top,
.tour-blur-right,
.tour-blur-bottom,
.tour-blur-left {
    position: fixed;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.tour-blur-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 100px; /* Initial size */
}

.tour-blur-right {
    top: 0;
    right: 0;
    width: 100px; /* Initial size */
    height: 100%;
}

.tour-blur-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px; /* Initial size */
}

.tour-blur-left {
    top: 0;
    left: 0;
    width: 100px; /* Initial size */
    height: 100%;
}

/* Spotlight - clear area with pulsing border */
.tour-spotlight {
    position: absolute;
    z-index: 2;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
    /* Initial dimensions to ensure visibility */
    min-width: 100px;
    min-height: 100px;
}

/* Pulsing animation for spotlight */
.tour-spotlight::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #c01d18; /* Developers Alliance red */
    border-radius: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.02); }
}

/* Tooltip */
.tour-tooltip {
    position: absolute;
    z-index: 3;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    min-width: 360px;
    padding: 0;
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
    font-family: 'Open Sans', sans-serif;
}

[data-theme="dark"] .tour-tooltip {
    background: oklch(0.18 0.015 250);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    user-select: none;
}

[data-theme="dark"] .tour-tooltip-header {
    border-bottom-color: oklch(0.22 0.015 250);
}

.tour-step-counter {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    color: #c01d18; /* Developers Alliance red */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tour-skip-btn {
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: #4b5563;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tour-skip-btn:hover {
    opacity: 1;
    color: #111827;
}

.tour-tooltip-content {
    padding: 24px;
}

.tour-tooltip-content h3 {
    font-size: 22px;
    font-weight: 700;
    font-family: 'Titillium Web', sans-serif;
    margin-bottom: 14px;
    color: #111827; /* Gray-900 */
}

[data-theme="dark"] .tour-tooltip-content h3 {
    color: oklch(0.90 0.01 250);
}

.tour-tooltip-content p,
.tour-tooltip-content div {
    font-size: 17px;
    line-height: 1.7;
    font-family: 'Open Sans', sans-serif;
    color: #374151; /* Gray-700 */
    margin: 0;
}

[data-theme="dark"] .tour-tooltip-content p {
    color: oklch(0.85 0.01 250);
}

.tour-tooltip-content ul {
    font-size: 17px;
    line-height: 1.7;
    font-family: 'Open Sans', sans-serif;
    color: #374151; /* Gray-700 */
}

[data-theme="dark"] .tour-tooltip-content ul {
    color: oklch(0.85 0.01 250);
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb; /* Gray-200 */
}

[data-theme="dark"] .tour-tooltip-footer {
    border-top-color: oklch(0.22 0.015 250);
}

.tour-tooltip-footer .btn {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
}

/* Tooltip Arrow */
.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

/* Arrow positioning variants */
.tour-tooltip.arrow-top::before {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: white;
}

.tour-tooltip.arrow-bottom::before {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: white;
}

.tour-tooltip.arrow-left::before {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: white;
}

.tour-tooltip.arrow-right::before {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: white;
}

[data-theme="dark"] .tour-tooltip.arrow-top::before {
    border-bottom-color: oklch(0.18 0.015 250);
}

[data-theme="dark"] .tour-tooltip.arrow-bottom::before {
    border-top-color: oklch(0.18 0.015 250);
}

[data-theme="dark"] .tour-tooltip.arrow-left::before {
    border-right-color: oklch(0.18 0.015 250);
}

[data-theme="dark"] .tour-tooltip.arrow-right::before {
    border-left-color: oklch(0.18 0.015 250);
}

/* Demo banner styles */
#tour-demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #c01d18;
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 10003;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tour-tooltip {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        margin: 0 !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 40vh;
        overflow-y: auto;
        border-top: 3px solid #c01d18 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
    }

    /* Remove arrow on mobile since tooltip is always at bottom */
    .tour-tooltip::before {
        display: none;
    }

    /* Compact padding for mobile */
    .tour-tooltip-header {
        padding: 12px 16px;
    }

    .tour-tooltip-content {
        padding: 16px;
        max-height: 25vh;
        overflow-y: auto;
    }

    .tour-tooltip-content h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .tour-tooltip-content p,
    .tour-tooltip-content div {
        font-size: 15px;
        line-height: 1.5;
    }

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

    /* Smaller banner on mobile */
    #tour-demo-banner {
        padding: 10px 16px;
        font-size: 14px;
        letter-spacing: 0.5px;
    }
}
