/**
 * FITWOR Onboarding Walkthrough - CSS Stilovi
 * 
 * @since 1.0.0
 * @package FITWOR
 */

/* ========================================
   OVERLAY
   ======================================== */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.onboarding-overlay.active {
    display: flex;
}

/* ========================================
   MODAL - CLEAN WHITE
   ======================================== */
.onboarding-modal {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Close button - HIDDEN */
.onboarding-close {
    display: none;
}

/* Progress bar */
.onboarding-progress-bar-container {
    height: 4px;
    background: #f0f0f0;
}

.onboarding-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3e8f04, #5cb02a);
    width: 10%;
    transition: width 0.3s ease;
}

/* ========================================
   CAROUSEL
   ======================================== */
.onboarding-carousel-container {
    flex: 1;
    overflow: hidden;
}

.onboarding-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

.onboarding-carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
}

/* ========================================
   SLIDE LAYOUT - IMAGE FOCUSED
   ======================================== */

/* Image section - takes most space */
.onboarding-slide-image-section {
    flex: 1;
    background: linear-gradient(180deg, #f8faf8 0%, #eef5ee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: 350px;
}

.onboarding-slide-image-wrapper {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    overflow: visible;
    position: relative;
}

.onboarding-slide-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ========================================
   TOOLTIPS / HOTSPOTS
   ======================================== */
.onboarding-tooltip-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.onboarding-tooltip {
    position: absolute;
    background: #FF6B35;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.5);
    display: flex;
    align-items: center;
    gap: 5px;
    animation: onboardingTooltipPulse 2s ease-in-out infinite;
}

.onboarding-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

/* Arrow pointing left */
.onboarding-tooltip.arrow-left::before {
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #FF6B35;
}

/* Arrow pointing right */
.onboarding-tooltip.arrow-right::before {
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #FF6B35;
}

/* Arrow pointing up */
.onboarding-tooltip.arrow-up::before {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #FF6B35;
}

/* Arrow pointing down */
.onboarding-tooltip.arrow-down::before {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #FF6B35;
}

/* Arrow pointing top-left (↖) */
.onboarding-tooltip.arrow-top-left::before {
    top: -10px;
    left: 10px;
    border-bottom-color: #FF6B35;
}

/* Arrow pointing top-right (↗) */
.onboarding-tooltip.arrow-top-right::before {
    top: -10px;
    right: 10px;
    border-bottom-color: #FF6B35;
}

/* Arrow pointing bottom-left (↙) */
.onboarding-tooltip.arrow-bottom-left::before {
    bottom: -10px;
    left: 10px;
    border-top-color: #FF6B35;
}

/* Arrow pointing bottom-right (↘) */
.onboarding-tooltip.arrow-bottom-right::before {
    bottom: -10px;
    right: 10px;
    border-top-color: #FF6B35;
}

.onboarding-tooltip-icon {
    font-size: 12px;
}

/* Multiline tooltip - za duže tekstove */
.onboarding-tooltip.onboarding-tooltip-multiline {
    display: block !important;
    white-space: normal !important;
    max-width: 250px !important;
    text-align: center !important;
    line-height: 1.6 !important;
}

@keyframes onboardingTooltipPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Desktop/Mobile switching */
.onboarding-slide-image-wrapper .desktop-img { display: block; }
.onboarding-slide-image-wrapper .mobile-img { display: none; }

/* Text section - compact */
.onboarding-slide-text-section {
    padding: 24px 30px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.onboarding-slide-badge {
    display: inline-block;
    background: #e8f5e0;
    color: #3e8f04;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.onboarding-slide-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.onboarding-slide-title .highlight {
    color: #3e8f04;
}

.onboarding-slide-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Welcome slide - special */
.onboarding-slide-welcome .onboarding-slide-image-section {
    background: linear-gradient(180deg, #3e8f04 0%, #2d7a03 100%);
}

.onboarding-slide-welcome .welcome-content {
    text-align: center !important;
    color: white !important;
}

.onboarding-slide-welcome .welcome-content * {
    color: white !important;
}

.onboarding-slide-welcome .welcome-content h2,
.onboarding-slide-welcome .welcome-content h2.welcome-title {
    color: white !important;
    font-weight: 700 !important;
}

.onboarding-slide-welcome .welcome-emoji {
    font-size: 60px;
    margin-bottom: 15px;
}

.onboarding-slide-welcome .welcome-logo {
    width: 160px;
    margin-bottom: 20px;
}

.onboarding-slide-welcome .welcome-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    color: white !important;
}

.onboarding-slide-welcome .welcome-text {
    font-size: 15px;
    opacity: 0.9;
    max-width: 400px;
}

/* Finish slide - special */
.onboarding-slide-finish .onboarding-slide-image-section {
    background: linear-gradient(180deg, #3e8f04 0%, #2d7a03 100%);
}

.onboarding-slide-finish .finish-content {
    text-align: center !important;
    color: white !important;
}

.onboarding-slide-finish .finish-content * {
    color: white !important;
}

.onboarding-slide-finish .finish-content h2,
.onboarding-slide-finish .finish-content h2.finish-title {
    color: white !important;
    font-weight: 700 !important;
}

.onboarding-slide-finish .finish-emoji {
    font-size: 70px;
    margin-bottom: 15px;
}

.onboarding-slide-finish .finish-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
    color: white !important;
}

.onboarding-slide-finish .finish-text {
    font-size: 14px;
    opacity: 0.9;
    max-width: 380px;
    line-height: 1.7;
}

.onboarding-slide-finish .finish-email {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 30px;
    margin-top: 15px;
    font-weight: 600;
}

/* ========================================
   NAVIGATION
   ======================================== */
.onboarding-carousel-nav {
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

/* Dots */
.onboarding-carousel-dots {
    display: flex;
    gap: 8px;
}

.onboarding-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.onboarding-carousel-dot:hover {
    background: #bbb;
}

.onboarding-carousel-dot.active {
    background: #3e8f04;
    width: 24px;
    border-radius: 4px;
}

/* Buttons */
.onboarding-nav-buttons {
    display: flex;
    gap: 10px;
}

.onboarding-btn-prev, .onboarding-btn-next {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-btn-prev {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.onboarding-btn-prev:hover {
    border-color: #3e8f04;
    color: #3e8f04;
}

.onboarding-btn-prev:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.onboarding-btn-next {
    background: #3e8f04;
    color: white;
    border: none;
}

.onboarding-btn-next:hover {
    background: #358003;
}

/* ========================================
   RESPONSIVE - MOBILE (FULL SCREEN)
   ======================================== */
@media (max-width: 768px) {
    .onboarding-overlay {
        padding: 0;
    }
    
    .onboarding-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .onboarding-carousel-container {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .onboarding-carousel-track {
        flex: 1;
    }
    
    .onboarding-carousel-slide {
        height: 100%;
    }
    
    .onboarding-slide-image-section {
        flex: 1;
        padding: 15px;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .onboarding-slide-image-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .onboarding-slide-image-wrapper img {
        width: 100%;
        height: auto;
        max-height: 70vh;
        object-fit: contain;
        object-position: top;
    }
    
    .onboarding-slide-text-section {
        padding: 15px 20px;
        flex-shrink: 0;
    }
    
    .onboarding-slide-badge {
        display: none;
    }
    
    .onboarding-slide-title {
        font-size: 17px;
        margin-bottom: 6px;
    }
    
    .onboarding-slide-description {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .onboarding-slide-welcome .welcome-emoji {
        font-size: 45px;
        margin-bottom: 10px;
    }
    
    .onboarding-slide-welcome .welcome-logo {
        width: 140px;
        margin-bottom: 15px;
    }
    
    .onboarding-slide-welcome .welcome-title {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .onboarding-slide-welcome .welcome-text {
        font-size: 14px;
    }
    
    .onboarding-slide-finish .finish-emoji {
        font-size: 50px;
    }
    
    .onboarding-slide-finish .finish-title {
        font-size: 20px;
    }
    
    .onboarding-slide-finish .finish-text {
        font-size: 13px;
    }
    
    .onboarding-carousel-nav {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .onboarding-carousel-dots {
        order: 1;
        width: 100%;
        justify-content: center;
        gap: 6px;
    }
    
    .onboarding-carousel-dot {
        width: 6px;
        height: 6px;
    }
    
    .onboarding-carousel-dot.active {
        width: 20px;
    }
    
    .onboarding-nav-buttons {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    
    .onboarding-btn-prev, .onboarding-btn-next {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    /* Tooltips - Mobile adjustments */
    .onboarding-tooltip {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .onboarding-tooltip-icon {
        font-size: 10px;
    }
    
    /* Hide desktop tooltips, show mobile */
    .onboarding-tooltip-container.desktop-only {
        display: none;
    }
    
    /* Desktop/Mobile image switching */
    .onboarding-slide-image-wrapper .desktop-img { display: none; }
    .onboarding-slide-image-wrapper .mobile-img { display: block; }
}

@media (min-width: 769px) {
    .onboarding-tooltip-container.mobile-only {
        display: none;
    }
}

