/* ============================================
   User Dashboard – Onboarding Tour Styles
   ============================================ */

/* --- Driver.js Theme Overrides --- */
.driver-popover {
    background: rgba(30, 30, 40, 0.97) !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(var(--accent-rgb), 0.4) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(12px);
    max-width: 340px !important;
    font-family: 'Outfit', sans-serif !important;
    text-shadow: none !important;
    animation: tour-border-pulse 1.8s ease-in-out infinite !important;
}
.driver-popover * {
    text-shadow: none !important;
}
.driver-popover .driver-popover-title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    font-family: 'Outfit', sans-serif !important;
}
.driver-popover .driver-popover-description {
    font-size: 0.85rem !important;
    color: #c0c0c8 !important;
    line-height: 1.5 !important;
    font-family: 'Outfit', sans-serif !important;
}
.driver-popover .driver-popover-progress-text {
    font-size: 0.75rem !important;
    color: #888 !important;
}
/* Hide native navigation footer — tour uses custom controls */
.driver-popover .driver-popover-footer {
    display: none !important;
}
/* Arrow per-direction color overrides */
.driver-popover-arrow-side-top {
    border-top-color: rgba(30, 30, 40, 0.97) !important;
}
.driver-popover-arrow-side-bottom {
    border-bottom-color: rgba(30, 30, 40, 0.97) !important;
}
.driver-popover-arrow-side-left {
    border-left-color: rgba(30, 30, 40, 0.97) !important;
}
.driver-popover-arrow-side-right {
    border-right-color: rgba(30, 30, 40, 0.97) !important;
}
.driver-popover .driver-popover-close-btn {
    color: #888 !important;
}
.driver-popover .driver-popover-close-btn:hover {
    color: #fff !important;
}

/* --- Force arrow to vertical center (for small nav buttons) --- */
.tour-arrow-vcenter .driver-popover-arrow {
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* --- Custom Next Button inside popover --- */
.tour-next-btn {
    display: inline-block;
    background: var(--accent-color, #e26159);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: background 0.2s;
    margin-top: 4px;
}
.tour-next-btn:hover {
    background: #c94f48;
}

/* --- Tour Suggestion Prompt --- */
.tour-suggestion {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1061;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    border-radius: 12px;
    padding: 16px 20px;
    max-width: 320px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-family: 'Outfit', sans-serif;
    animation: tour-slide-in 0.3s ease-out, tour-border-pulse 2s ease-in-out 0.3s infinite;
}
.tour-suggestion h6 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 600;
}
.tour-suggestion p {
    color: #b0b0b8;
    font-size: 0.82rem;
    margin-bottom: 12px;
    line-height: 1.45;
}
.tour-suggestion .tour-suggestion-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.tour-suggestion .btn-tour-start {
    background: var(--accent-color, #e26159);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: background 0.2s;
}
.tour-suggestion .btn-tour-start:hover {
    background: #c94f48;
}
.tour-suggestion .btn-tour-dismiss {
    background: transparent;
    color: #888;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: color 0.2s, border-color 0.2s;
}
.tour-suggestion .btn-tour-dismiss:hover {
    color: #ccc;
    border-color: rgba(255,255,255,0.25);
}
@keyframes tour-slide-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tour-border-pulse {
    0%   { border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 0 rgba(var(--accent-rgb), 0.5); }
    70%  { border-color: rgba(var(--accent-rgb), 0.3); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 8px rgba(var(--accent-rgb), 0); }
    100% { border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* --- Management Panel --- */
.tour-mgmt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1054;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.tour-mgmt-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.tour-mgmt-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100vh;
    z-index: 1055;
    background: var(--sidebar-bg-color, #1a1a2e);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    font-family: 'Outfit', sans-serif;
    color: #e0e0e0;
}
.tour-mgmt-panel.open {
    right: 0;
}
.tour-mgmt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tour-mgmt-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}
.tour-mgmt-header .btn-close {
    filter: invert(1);
    opacity: 0.6;
}
.tour-mgmt-header .btn-close:hover {
    opacity: 1;
}
.tour-mgmt-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
}
.tour-mgmt-global {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tour-mgmt-global span {
    font-size: 0.88rem;
    color: #ccc;
}
/* Toggle switches — visible on dark background */
.tour-mgmt-panel .form-check-input {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}
.tour-mgmt-panel .form-check-input:checked {
    background-color: var(--accent-color, #e26159) !important;
    border-color: var(--accent-color, #e26159) !important;
}
.tour-mgmt-panel .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--accent-rgb), 0.25) !important;
}
.tour-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: opacity 0.25s, filter 0.25s;
}
.tour-card.tour-card-disabled {
    opacity: 0.4;
    filter: grayscale(1);
}
.tour-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.tour-card-info strong {
    font-size: 0.88rem;
    color: #fff;
    display: block;
    margin-bottom: 2px;
}
.tour-card-info .tour-card-desc {
    font-size: 0.78rem;
    color: #999;
    line-height: 1.4;
}
.tour-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.tour-badge-in-progress {
    background-color: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-color, #e26159);
}
.tour-card-footer .badge {
    font-size: 0.72rem;
    font-weight: 500;
}
.tour-card-footer .tour-reset-btn {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.tour-card-footer .tour-reset-btn:hover {
    background-color: #ef4444;
    color: white;
}

/* --- ? Button highlight --- */
#tour-help-btn {
    position: relative;
}
#tour-help-btn .tour-help-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color, #e26159);
    animation: tour-pulse 1.8s infinite;
}
@keyframes tour-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
