/* Dashboard Onboarding Tooltip System */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    display: none;
    pointer-events: none;
}

.onboarding-overlay.active {
    display: block;
    pointer-events: auto;
}

.onboarding-tooltip {
    position: absolute;
    background: linear-gradient(135deg, #1488CC 0%, #2B32B2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 320px;
    min-width: 280px;
    box-shadow: 0 15px 35px rgba(20, 136, 204, 0.3);
    z-index: 99999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.onboarding-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.onboarding-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 12px solid transparent;
}

/* Tooltip arrow positioning */
.onboarding-tooltip.arrow-bottom::before {
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #1488CC;
}

.onboarding-tooltip.arrow-top::before {
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #1488CC;
}

.onboarding-tooltip.arrow-left::before {
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #1488CC;
}

.onboarding-tooltip.arrow-right::before {
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #1488CC;
}

.onboarding-tooltip .tooltip-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.onboarding-tooltip .tooltip-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
    color: white;
}

.onboarding-tooltip .tooltip-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    color: white;
}

.onboarding-tooltip .step-indicator {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.onboarding-tooltip .tooltip-content {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    opacity: 0.95;
    color: white;
}

.onboarding-tooltip .tooltip-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.onboarding-tooltip .btn-skip {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-tooltip .btn-skip:hover {
    background: rgba(255, 255, 255, 0.3);
}

.onboarding-tooltip .btn-next {
    background: white;
    color: #1488CC;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.onboarding-tooltip .btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.3);
}

.onboarding-tooltip .btn-finish {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-tooltip .btn-finish:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.3);
}

/* Highlighted element styling */
.onboarding-highlight {
    position: relative;
    z-index: 10002;
    border-radius: 8px;
    animation: onboardingPulse 2s infinite;
}

@keyframes onboardingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(20, 136, 204, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(20, 136, 204, 0.1);
    }
}

/* Progress indicator */
.onboarding-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 12px 20px;
    z-index: 10003;
    display: none;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.onboarding-progress.active {
    display: flex;
}

.onboarding-progress .progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.onboarding-progress .progress-bar {
    width: 100px;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.onboarding-progress .progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #1488CC 0%, #2B32B2 100%);
    transition: width 0.3s ease;
}

/* Welcome modal */
.onboarding-welcome {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1488CC 0%, #2B32B2 100%);
    color: #ffffff !important;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    z-index: 10004;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: none;
    pointer-events: auto;
}

.onboarding-welcome.active {
    display: block;
    animation: welcomeSlideIn 0.4s ease;
    color: #ffffff !important;
}

/* Force white text for all elements inside welcome modal */
.onboarding-welcome *,
.onboarding-welcome.active *,
.onboarding-welcome h1,
.onboarding-welcome h2,
.onboarding-welcome h3,
.onboarding-welcome h4,
.onboarding-welcome h5,
.onboarding-welcome h6,
.onboarding-welcome p,
.onboarding-welcome span,
.onboarding-welcome div,
.onboarding-welcome strong,
.onboarding-welcome em,
.onboarding-welcome b,
.onboarding-welcome i {
    color: #ffffff !important;
    text-shadow: none !important;
    background: none !important;
    background-color: transparent !important;
}

/* Remove any text highlighting or selection background */
.onboarding-welcome *::selection,
.onboarding-welcome.active *::selection {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.onboarding-welcome *::-moz-selection,
.onboarding-welcome.active *::-moz-selection {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

@keyframes welcomeSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.onboarding-welcome .welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1488CC 0%, #2B32B2 100%);
    border-radius: 20px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.onboarding-welcome h2 {
    color: #ffffff !important;
    margin-bottom: 15px;
    font-weight: 700;
}

.onboarding-welcome p {
    color: #ffffff !important;
    line-height: 1.6;
    margin-bottom: 25px;
}

.onboarding-welcome * {
    color: #ffffff !important;
}

/* Override any Bootstrap or framework text colors */
.onboarding-welcome .text-dark,
.onboarding-welcome .text-black,
.onboarding-welcome .text-body,
.onboarding-welcome .text-muted {
    color: #ffffff !important;
}

/* Force override for any inline styles or computed styles */
.onboarding-welcome[style*="color"],
.onboarding-welcome *[style*="color"] {
    color: #ffffff !important;
}

.onboarding-welcome .btn-start-tour {
    background: linear-gradient(135deg, #1488CC 0%, #2B32B2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 15px;
}

.onboarding-welcome .btn-start-tour:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 136, 204, 0.3);
}

.onboarding-welcome .btn-skip-tour {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 13px 30px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-welcome .btn-skip-tour:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .onboarding-tooltip {
        max-width: 280px;
        min-width: 250px;
        padding: 15px;
    }
    
    .onboarding-welcome {
        padding: 30px 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .onboarding-progress {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
    }
    
    .onboarding-progress .progress-bar {
        width: 80px;
    }
}

/* Demo Card in Welcome Modal */
.tooltip-demo-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.demo-card-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.demo-card-header span {
    color: white !important;
}

.demo-card-body {
    padding: 12px 16px;
    font-size: 13px;
    color: white !important;
}

.demo-card-body small {
    color: white !important;
}

.help-icon-demo {
    color: #60a5fa;
    font-size: 16px;
}

/* Card Help Icons */
.card-help-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #1488CC;
    font-size: 16px;
    cursor: help;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.card-help-icon:hover {
    opacity: 1;
}

/* Hover Tooltip Styles */
.hover-tooltip {
    position: absolute;
    background: linear-gradient(135deg, #1488CC 0%, #2B32B2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 250px;
    box-shadow: 0 8px 24px rgba(20, 136, 204, 0.3);
    z-index: 99999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.hover-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1488CC;
}