/* ==========================================================================
   Modern Application Tour Design System
   Sleek Glassmorphism, Spotlight Glow, Animated Progress & Polished Controls
   ========================================================================== */

/* 1. Backdrop Overlay */
.tour-backdrop {
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease !important;
    z-index: 10000 !important;
}

.tour-step-backdrop {
    z-index: 10001 !important;
    position: relative !important;
    border-radius: 10px !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.6), 0 0 25px rgba(99, 102, 241, 0.4) !important;
    animation: tourPulseGlow 2s infinite ease-in-out !important;
}

@keyframes tourPulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.6), 0 0 25px rgba(99, 102, 241, 0.35);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(99, 102, 241, 0.85), 0 0 35px rgba(99, 102, 241, 0.6);
    }
}

/* 2. Main Popover Card Container */
.popover.tour.modern-tour-card {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.08) !important;
    max-width: 380px !important;
    min-width: 320px !important;
    padding: 0 !important;
    overflow: hidden !important;
    z-index: 10002 !important;
    animation: tourCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

@keyframes tourCardPop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 3. Top Progress Bar */
.tour-progress-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.tour-progress-bar {
    height: 100%;
    width: 12.5%;
    background: linear-gradient(90deg, #6366f1 0%, #38bdf8 100%);
    border-radius: 99px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 4. Popover Arrow Styling */
.popover.tour.modern-tour-card .arrow,
.popover.tour.modern-tour-card .arrow:after {
    border-width: 10px !important;
}

.popover.tour.modern-tour-card.bottom .arrow {
    border-bottom-color: rgba(226, 232, 240, 0.8) !important;
    top: -10px !important;
}
.popover.tour.modern-tour-card.bottom .arrow:after {
    border-bottom-color: #ffffff !important;
    top: 1px !important;
}

.popover.tour.modern-tour-card.top .arrow {
    border-top-color: rgba(226, 232, 240, 0.8) !important;
    bottom: -10px !important;
}
.popover.tour.modern-tour-card.top .arrow:after {
    border-top-color: #ffffff !important;
    bottom: 1px !important;
}

.popover.tour.modern-tour-card.right .arrow {
    border-right-color: rgba(226, 232, 240, 0.8) !important;
    left: -10px !important;
}
.popover.tour.modern-tour-card.right .arrow:after {
    border-right-color: #ffffff !important;
    left: 1px !important;
}

.popover.tour.modern-tour-card.left .arrow {
    border-left-color: rgba(226, 232, 240, 0.8) !important;
    right: -10px !important;
}
.popover.tour.modern-tour-card.left .arrow:after {
    border-left-color: #ffffff !important;
    right: 1px !important;
}

/* 5. Header Area */
.tour-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 10px 20px;
    background: #ffffff;
}

.tour-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.tour-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.15);
}

.popover.tour.modern-tour-card .popover-title.tour-title {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.tour-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tour-step-pill {
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    background: #eef2ff;
    padding: 3px 9px;
    border-radius: 99px;
    letter-spacing: 0.3px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.tour-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.tour-close-btn:hover {
    background: #f1f5f9;
    color: #ef4444;
}

/* 6. Body & Content */
.popover.tour.modern-tour-card .popover-content.tour-body {
    padding: 10px 20px 18px 20px !important;
    color: #475569 !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    font-weight: 450 !important;
}

/* 7. Footer Navigation */
.popover-navigation.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.tour-dots {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.tour-dot.active {
    width: 18px;
    background: #6366f1;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.tour-dot.completed {
    background: #94a3b8;
}

.tour-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Button Prev */
.btn-tour-prev {
    background: #ffffff !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 6px 13px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.btn-tour-prev:hover:not(:disabled) {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

.btn-tour-prev:disabled,
.btn-tour-prev.disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Button Next */
.btn-tour-next {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 7px 16px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3) !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.btn-tour-next:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 14px rgba(79, 70, 229, 0.45) !important;
    color: #ffffff !important;
}

.btn-tour-next:active {
    transform: translateY(0) !important;
}

.btn-tour-next.is-finish {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35) !important;
}

.btn-tour-next.is-finish:hover {
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.5) !important;
}

/* Hide default button styling overrides from old templates */
.popover.tour .btn-default[data-role="end"] {
    display: none !important;
}
