/**
 * 섹션 캠페인 카드 공통 스타일
 *
 * 사용처: inc_fcfs_campaign, inc_assaview_time_preview, inc_assaview_time 등
 * 클래스 접두어: sc_ (section-card)
 *
 * 카드 상세(details, tag_area, subject, desc 등)는 기존 campaign_card 글로벌 스타일을 사용.
 * 여기에는 이미지/오버레이/배지/캐러셀/네비 등 섹션 전용 공통만 포함.
 */

/* ===== 오버레이 (어두운 그라디언트) ===== */
.sc_overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.sc_overlay_text {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    letter-spacing: -0.5px;
    line-height: 24px;
}

/* ===== 신청 현황 배지 (이미지 위) ===== */
.sc_apply_badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    padding: 9.5px;
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 16px;
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1;
    line-height: 1;
}
.sc_apply_badge b {
    color: #69f0ff;
    font-weight: 700;
}

/* ===== Embla 캐러셀 공통 ===== */
.sc_embla {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.sc_embla__container {
    display: flex;
    gap: 16px;
}

.sc_embla__slide {
    flex: 0 0 220px;
    max-width: 220px;
    min-width: 0;
}
/* ===== 카드 상세 (피그마 기준) ===== */
.sc_embla__slide.campaign_card .details {
    padding: 16px 0 0;
    color: #666;
}
.sc_embla__slide.campaign_card .tag_area {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    line-height: 1;
}
.sc_embla__slide.campaign_card .tag_area img {
    width: 20px;
    height: 20px;
}
.sc_embla__slide.campaign_card .tag_area span {
    font-size: 15px;
    font-weight: 700;
    color: #666;
    line-height: 20px;
}
.sc_embla__slide.campaign_card .tag_area .cp_type {
    display: flex;
    align-items: center;
    gap: 5px;
}
.sc_embla__slide.campaign_card .tag_area .cp_type img {
    max-width: 20px;
    height: 100%;
    object-fit: cover;
}
.sc_embla__slide.campaign_card .subject {
    font-size: 16px;
    font-weight: 500;
    color: #2f343b;
    line-height: 28px;
    margin-bottom: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: keep-all;
}
.sc_embla__slide.campaign_card .desc {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.sc_embla__slide.campaign_card .desc .opt_name {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    display: block;
    width: 100%;
    line-height: 1;
    height: 19px;
}

/* 글로벌 스타일 리셋 + 카드 고정 크기 강제 */
.sc_embla__slide.campaign_card {
    max-width: 220px !important;
    width: 220px !important;
    margin: 0 !important;
    flex-shrink: 0;
}
/* 이미지 정사각 강제 */
.sc_embla__slide.campaign_card .imgBox {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
}
.sc_embla__slide.campaign_card .imgBox > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== 네비게이션 버튼 (48px, 투명) ===== */
.sc_nav {
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.sc_nav:hover { opacity: 1; }
.sc_nav:focus { box-shadow: none; }
.sc_nav:disabled { opacity: 1; cursor: default; }

/* ===== 모바일 ===== */
@media (max-width: 799px) {
    .sc_overlay_text {
        font-size: 14px;
    }
    .sc_apply_badge {
        font-size: 12px;
        padding: 4px;
        top: 5px;
        left: 5px;
    }
    .sc_embla__slide.campaign_card .imgBox {
        border-radius: 8px;
    }
    .sc_overlay {
        border-radius: 8px;
    }
    .sc_embla__container {
        gap: 10px;
        padding-left: 15px;
    }
    .sc_embla__slide {
        flex: 0 0 128px;
        max-width: 128px;
    }
    .sc_embla__slide.campaign_card {
        max-width: 128px !important;
        width: 128px !important;
    }
    .sc_embla__slide.campaign_card .details {
        padding: 8px 0 0;
    }
    .sc_embla__slide.campaign_card .tag_area {
        margin-bottom: 6px;
    }
    .sc_embla__slide.campaign_card .tag_area img {
        width: 18px;
        height: 18px;
    }
    .sc_embla__slide.campaign_card .tag_area .cp_type img {
        max-width: 18px;
    }
    .sc_embla__slide.campaign_card .tag_area span {
        font-size: 12px;
        line-height: 18px;
    }
    .sc_embla__slide.campaign_card .subject {
        font-size: 14px;
        font-weight: 500;
        line-height: 20px;
        margin-bottom: 2px;
    }
    .sc_embla__slide.campaign_card .desc .opt_name {
        font-size: 12px;
        height: auto;
        line-height: 1.3;
    }
    .sc_nav {
        display: none;
    }
}
