/**
 * Offer Ribbon Styles
 * Carousel ribbon above navbar
 * Admin-controlled promotional banner
 */

/* ========================================
   Ribbon Container
   ======================================== */
.hi-offer-ribbon {
    position: relative; /* lives in normal document flow; nav below renders flush */
    z-index: 50;
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 50%, #f8fafc 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
    transition: opacity 0.3s ease;
}

.hi-offer-ribbon::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 112, 243, 0.25), transparent);
}

.hi-offer-ribbon.hidden {
    display: none;
}

body.pq-quiz-page #hiOfferRibbon,
body.page-template-page-ai-interview #hiOfferRibbon {
    display: none !important;
}


/* ========================================
   Container
   ======================================== */
.hi-offer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 60px 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
    min-height: 44px;
}

/* ========================================
   Carousel
   ======================================== */
.hi-offer-carousel {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 24px;
}

.hi-offer-slide {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: slideIn 0.5s ease;
    flex-wrap: wrap;
}

.hi-offer-slide.active {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Text & CTA
   ======================================== */
.hi-offer-text {
    color: #475569;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.hi-offer-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(0, 112, 243, 0.08);
    border: 1px solid rgba(0, 112, 243, 0.25);
    border-radius: 999px;
    color: #0070f3;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hi-offer-cta:hover {
    background: rgba(0, 112, 243, 0.14);
    border-color: #0070f3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.15);
}

.hi-offer-cta:active {
    transform: translateY(0);
}

/* ========================================
   Dots Navigation
   ======================================== */
.hi-offer-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hi-offer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.18);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hi-offer-dot:hover {
    background: rgba(0, 112, 243, 0.5);
}

.hi-offer-dot.active {
    background: #0070f3;
    width: 18px;
    border-radius: 4px;
}

/* ========================================
   Close Button
   ======================================== */
.hi-offer-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.hi-offer-close:hover {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.3);
    color: #0f172a;
    transform: translateY(-50%) rotate(90deg);
}

.hi-offer-close svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   In-flow ribbon = no body padding / header
   offset math required. Sticky navs & fixed
   headers below simply render beneath it.
   ======================================== */

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .hi-offer-container {
        padding: 8px 50px 8px 16px;
        min-height: 40px;
    }
    
    .hi-offer-text {
        font-size: 12px;
    }
    
    .hi-offer-cta {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    .hi-offer-dots {
        display: none;
    }
    
    .hi-offer-close {
        width: 28px;
        height: 28px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .hi-offer-text {
        font-size: 11px;
    }
    
    .hi-offer-cta {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .hi-offer-slide {
        gap: 8px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .hi-offer-ribbon {
        display: none;
    }
    
}

/* ========================================
   Accessibility
   ======================================== */
.hi-offer-ribbon:focus-within {
    outline: 2px solid rgba(0, 112, 243, 0.35);
    outline-offset: -2px;
}

.hi-offer-cta:focus,
.hi-offer-dot:focus,
.hi-offer-close:focus {
    outline: 2px solid #0070f3;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hi-offer-ribbon,
    .hi-offer-slide,
    .hi-offer-cta,
    .hi-offer-dot,
    .hi-offer-close {
        animation: none;
        transition: none;
    }
}
