/* ==========================================================================
   SSWordbook - Product Tour Styles (Driver.js Custom Theme)
   ========================================================================== */

/* Popover Container */
.driver-popover.ssw-tour-popover {
    background: #ffffff;
    color: #2c3e50;
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22), 0 0 1px rgba(15, 23, 42, 0.15);
    border: 1px solid rgba(226, 232, 240, 0.8);
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    animation: sswTourFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000000000;
}

@keyframes sswTourFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Accent bar at the top of popover */
.driver-popover.ssw-tour-popover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: 4px 4px 0 0;
}

/* Arrow */
.driver-popover.ssw-tour-popover .driver-popover-arrow {
    border-color: #ffffff;
}

.driver-popover.ssw-tour-popover .driver-popover-arrow-side-top {
    border-top-color: #ffffff;
}
.driver-popover.ssw-tour-popover .driver-popover-arrow-side-bottom {
    border-bottom-color: #ffffff;
}
.driver-popover.ssw-tour-popover .driver-popover-arrow-side-left {
    border-left-color: #ffffff;
}
.driver-popover.ssw-tour-popover .driver-popover-arrow-side-right {
    border-right-color: #ffffff;
}

/* Close Button (X) */
.driver-popover.ssw-tour-popover .driver-popover-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.driver-popover.ssw-tour-popover .driver-popover-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Title */
.driver-popover.ssw-tour-popover .driver-popover-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    padding-right: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
}

.driver-popover.ssw-tour-popover .driver-popover-title i {
    color: #3b82f6;
}

/* Description */
.driver-popover.ssw-tour-popover .driver-popover-description {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 16px;
}

.driver-popover.ssw-tour-popover .driver-popover-description p {
    margin-bottom: 6px;
}
.driver-popover.ssw-tour-popover .driver-popover-description p:last-child {
    margin-bottom: 0;
}

.driver-popover.ssw-tour-popover .driver-popover-description ul {
    padding-left: 18px;
    margin: 6px 0;
}

.driver-popover.ssw-tour-popover .driver-popover-description li {
    margin-bottom: 4px;
}

.driver-popover.ssw-tour-popover .tour-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    margin-right: 4px;
}

/* Footer & Buttons */
.driver-popover.ssw-tour-popover .driver-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

/* Progress text (Step X of Y) */
.driver-popover.ssw-tour-popover .driver-popover-progress-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigation Buttons Group */
.driver-popover.ssw-tour-popover .driver-popover-navigation-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Prev Button */
.driver-popover.ssw-tour-popover .driver-popover-prev-btn {
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: none;
}

.driver-popover.ssw-tour-popover .driver-popover-prev-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

/* Next / Done Button */
.driver-popover.ssw-tour-popover .driver-popover-next-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
    text-shadow: none;
}

.driver-popover.ssw-tour-popover .driver-popover-next-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

/* Highlight Stage Styling */
.driver-stage {
    border-radius: 12px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.65), 0 0 20px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Quick Tour Launch Button in Header / Floating */
.btn-tour-launch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-tour-launch:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.5);
    color: #ffffff !important;
}

/* Responsive adjustment */
@media (max-width: 576px) {
    .driver-popover.ssw-tour-popover {
        max-width: calc(100vw - 32px);
        margin: 0 16px;
        padding: 16px 18px;
    }

    .driver-popover.ssw-tour-popover .driver-popover-title {
        font-size: 0.98rem;
    }

    .driver-popover.ssw-tour-popover .driver-popover-description {
        font-size: 0.82rem;
    }
}
