/**
 * Happy School - Flash Sale Feature Styles
 * Premium High-Conversion Design with Glassmorphism & Animations
 */

/* ==========================================================================
   1. Flash Sale Spotlight Banner (Trang Khóa Học Online)
   ========================================================================== */
.hsc-flash-sale-spotlight {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #431407 100%);
    border-radius: 20px;
    padding: 32px 36px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px -15px rgba(234, 88, 12, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    color: #ffffff;
}

/* Background Glow Effects */
.hsc-flash-sale-spotlight::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.35) 0%, rgba(234, 88, 12, 0) 70%);
    pointer-events: none;
    z-index: 1;
}
.hsc-flash-sale-spotlight::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.2) 0%, rgba(225, 29, 72, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.hsc-fs-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    align-items: center;
}

/* Left Content */
.hsc-fs-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hsc-fs-badge-fire {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #ea580c, #dc2626);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 6px 14px;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
    animation: hscPulseFire 2s infinite ease-in-out;
}

@keyframes hscPulseFire {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 6px 20px rgba(234, 88, 12, 0.6);
    }
}

.hsc-fs-badge-discount {
    display: inline-block;
    background: #fef08a;
    color: #9a3412;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 9999px;
}

.hsc-fs-title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.hsc-fs-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hsc-fs-title a:hover {
    color: #fb923c;
}

.hsc-fs-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin: 0 0 18px 0;
    line-height: 1.5;
    max-width: 540px;
}

/* Timer Display in Spotlight */
.hsc-fs-timer-wrap {
    margin-bottom: 20px;
}

.hsc-fs-timer-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fdba74;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.hsc-fs-timer-boxes {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hsc-fs-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 58px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hsc-fs-num {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.hsc-fs-unit {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #cbd5e1;
    font-weight: 600;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.hsc-fs-colon {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fb923c;
    animation: hscBlink 1s infinite;
}

@keyframes hscBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Right Side - Price Card & Action */
.hsc-fs-action-box {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hsc-fs-course-preview {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hsc-fs-course-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.hsc-fs-pricing-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hsc-fs-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.hsc-fs-sale-price {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 900;
    color: #fb923c;
    line-height: 1;
}

.hsc-fs-orig-price {
    font-size: 1.1rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.hsc-fs-save-text {
    font-size: 0.85rem;
    color: #4ade80;
    font-weight: 600;
}

.hsc-fs-btn-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.hsc-fs-buy-btn {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.4);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hsc-fs-buy-btn:hover {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5);
    color: #ffffff;
}

.hsc-fs-detail-link {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 13px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hsc-fs-detail-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ==========================================================================
   2. Flash Sale Enhancements for Course Cards (Grid)
   ========================================================================== */
.hsc-course-card.has-flash-sale {
    border: 2px solid #fdba74;
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.15);
}

.hsc-card-fs-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ea580c, #dc2626);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    animation: hscPulseFire 2.2s infinite ease-in-out;
}

.hsc-card-fs-timer {
    background: #fff7ed;
    border: 1px dashed #fed7aa;
    border-radius: 6px;
    padding: 5px 10px;
    margin: 8px 0;
    font-size: 0.78rem;
    color: #c2410c;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hsc-card-fs-timer .hsc-timer-val {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ea580c;
}

.hsc-fs-discount-badge {
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-left: 6px;
}

/* ==========================================================================
   3. Flash Sale on Single Course Page
   ========================================================================== */
.hsc-single-fs-banner {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fed7aa;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hsc-single-fs-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hsc-single-fs-icon {
    font-size: 1.8rem;
    animation: hscPulseFire 1.8s infinite;
}

.hsc-single-fs-name {
    font-weight: 800;
    color: #9a3412;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.hsc-single-fs-sub {
    font-size: 0.82rem;
    color: #c2410c;
}

.hsc-single-fs-timer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hsc-single-fs-timer .hsc-single-box {
    background: #ffffff;
    border: 1px solid #fdba74;
    border-radius: 6px;
    padding: 4px 8px;
    min-width: 44px;
    text-align: center;
}

.hsc-single-fs-timer .hsc-num {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: #ea580c;
    line-height: 1;
    display: block;
}

.hsc-single-fs-timer .hsc-unit {
    font-size: 0.6rem;
    color: #64748b;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* Expired transition state */
.hsc-fs-expired {
    display: none !important;
}

/* ==========================================================================
   5. Spotlight Flash Sale Carousel (Slide chuyển đổi ngang mượt mà như Slick)
   ========================================================================== */
.hsc-fs-carousel-container {
    position: relative;
    padding: 32px 54px 46px 54px; /* Dành khoảng trống 54px 2 bên cho nút Prev/Next không đè lên nội dung */
}

.hsc-fs-slides-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.hsc-fs-slides-track {
    display: flex;
    width: 100%;
    transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.hsc-fs-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

/* Nút Next / Prev đặt hoàn toàn bên trong khung container (không bị cắt mép) */
.hsc-fs-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    line-height: 1;
}

.hsc-fs-nav-btn:hover {
    background: linear-gradient(135deg, #ea580c, #f97316);
    border-color: rgba(255, 255, 255, 0.85);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 22px rgba(234, 88, 12, 0.65);
}

.hsc-fs-prev {
    left: 12px;
}

.hsc-fs-next {
    right: 12px;
}

/* Dots chuyển slide */
.hsc-fs-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.hsc-fs-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.hsc-fs-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hsc-fs-dot.is-active {
    background: #fb923c;
    width: 28px;
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.7);
    border-color: #fdba74;
}

/* Responsive cho Carousel */
@media (max-width: 991px) {
    .hsc-fs-carousel-container {
        padding: 24px 38px 44px 38px;
    }
    .hsc-fs-prev {
        left: 6px;
    }
    .hsc-fs-next {
        right: 6px;
    }
}

@media (max-width: 576px) {
    .hsc-fs-carousel-container {
        padding: 20px 24px 42px 24px;
    }
    .hsc-fs-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .hsc-fs-prev {
        left: 4px;
    }
    .hsc-fs-next {
        right: 4px;
    }
}
