@charset "UTF-8";
/* ----------------------------------------
 * COSFET21 Vote Page Styles
 * Created : 202504
 * topbar 공통 스타일은 cosfet21.css 참고
 --------------------------------------- */

/* ===== PAGE WRAPPER ===== */
.vote-page-wrap {
    width: 100%;
    background-color: #fff;
}

.vote-page-wrap .cft21-topbar {
    padding-bottom: 0;
}

/* ===== CONTENT AREA =====
 * 피그마 기준: 콘텐츠 너비 948px, 상단 7px / 좌우 51px / 하단 80px 여백
 */
.vote-content {
    max-width: 948px;
    margin: 0 auto;
    padding: 7px 51px 80px;
    display: flex;
    flex-direction: column;
    gap: 28px; /* 헤더 영역 ↔ 카드 그리드 간격 (피그마 margin-bottom: 28px 환산) */
}

/* ===== HEADER: 타이틀 + 서브타이틀 + 검색 ===== */
.vote-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vote-title-img {
    height: 39px;
    width: auto;
}

.vote-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding-bottom: 8px; /* 타이틀 ↔ 서브타이틀 간격: 피그마 margin-bottom: 8px 환산 */
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.vote-title__cosfe {
    background: linear-gradient(90deg, #FF6156, #EB288E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vote-title__label {
    color: #FF7939;
    -webkit-text-fill-color: #FF7939;
}

.vote-subtitle {
    margin: 0;
    padding-bottom: 38px; /* 서브타이틀 ↔ 검색폼 간격: 피그마 margin-bottom: 16px 환산 */
    font-size: 15px;
    font-weight: 300;
    color: #000000;
    text-align: center;
    line-height: 20px;
    letter-spacing: -0.3px;
}

/* ===== SEARCH FORM ===== */
.vote-search-form {
    display: flex;
    align-items: center;
}

.vote-search-input {
    width: 222px;
    height: 26px;
    padding: 0 10px; /* 상하 0, 좌우 10px: 피그마 padding: 2px 10px → 높이 26px 기준 재환산 */
    border: 1px solid #CCCCCC;
    border-radius: 2px 0 0 2px;
    background: #EEEEEE;
    font-size: 10px;
    font-weight: 400;
    color: #333;
    font-family: 'Inter', sans-serif;
    outline: none;
    box-sizing: border-box;
}

.vote-search-input::placeholder {
    color: #999;
}

.vote-search-btn {
    height: 26px;
    padding: 0 16px; /* 피그마 padding: 0 16px 그대로 유지 */
    background: linear-gradient(90deg, #FF6156, #EB288E);
    border: none;
    border-radius: 0 2px 2px 0;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
}

.vote-search-btn:hover {
    opacity: 0.85;
}

/* ===== CARD GRID =====
 * 원본 디자인 기준: 6열
 * 열 간격 비율 분석: 948px 콘텐츠 / 6열 / 5 gap
 *   → PNG 실측 scale 환산 column-gap ≈ 16px
 *   → 카드 1개 너비 = (948 - 5×16) ÷ 6 ≈ 144.7px (1fr로 균등 분배)
 */
.vote-card-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 16px; /* row-gap: 20px / column-gap: 16px */
}

/* ===== CARD ===== */
.vote-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
}

/* ===== CARD TOP: 배지 + 닉네임 (이미지 위쪽, 좌측 정렬) ===== */
.vote-card__top {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 4px;
    width: 100%;
    min-width: 0;
}

/* ===== CARD BADGE ===== */
.vote-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    background: linear-gradient(135deg, #FE6155, #EB288E);
    border-radius: 20px;
    flex-shrink: 0;
    font-size: 8px;
    font-weight: 500;
    color: #FFFFFF;
    letter-spacing: 0.2px;
    line-height: 1.4;
    white-space: nowrap;
}

/* ===== CARD IMAGE WRAPPER ===== */
.vote-card__img-wrap {
    width: 100%;
    margin-bottom: 6px;
}

/* ===== CARD IMAGE BOX =====
 * aspect-ratio: 142 / 200 → 피그마 카드 비율 (142 × 200px) 그대로 유지
 */
.vote-card__img-box {
    width: 100%;
    aspect-ratio: 142 / 200;
    border-radius: 8px;
    background: #C7C7C7;
    overflow: hidden;
}

.vote-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== CARD NAME ===== */
.vote-card__name {
    font-size: 13px;
    font-weight: 700;
    color: #161616;
    line-height: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ===== CARD ACTIONS =====
 * gap: 10px → 좋아요 버튼 ↔ 공유 버튼 간격 (피그마 gap: 10px 그대로)
 */
.vote-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.vote-card__like-btn,
.vote-card__share-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

/* gap: 3px → 하트 아이콘 ↔ 좋아요 수 간격 (피그마 gap: 3px 그대로) */
.vote-card__like-btn {
    gap: 3px;
}

.vote-card__like-btn svg path {
    fill: none;
    stroke: #999;
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill 0.15s ease, stroke 0.15s ease;
}

.vote-card__like-btn.is-liked svg path {
    fill: #FE6155;
    stroke: #FE6155;
}

.vote-card__like-count {
    font-size: 13px;
    font-weight: 500;
    color: #000000;
    line-height: 17px;
}

/* ================================================
   MODAL — 코스어 상세 팝업
   PC: .vote-modal 자체가 dim / 중앙 카드 (396px)
   Mobile: 전체화면 회색(#E4E4E4) 레이어
   ================================================ */

/* PC: 오버레이 자체가 dim (숨김 상태) */
.vote-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
}

.vote-modal.is-open {
    display: flex;
}

/* PC: 로고 + 카드를 세로로 묶는 래퍼 (dim 위에 표시) */
.vote-modal__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 396px;
}

/* PC 전용: 투명 배경 로고 영역 (background 없음 → dim이 그대로 보임) */
.vote-modal__logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 287px;
    height: 58px;
    margin-bottom: 12px;
}

.vote-modal__logo {
    width: 287px;
    height: 58px;
    object-fit: contain;
    display: block;
}

/* 카드 컨테이너 (PC: inner 너비 100% 상속) */
.vote-modal__container {
    width: 100%;
    background: #FFFFFF;
    border-radius: 2px;
    box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    max-height: 95vh;
    font-family: 'Inter', sans-serif;
}

/* 모바일 전용 레이아웃: PC에서 숨김 */
.vote-modal__mobile-layout {
    display: none;
}

/* 공통 카드 본문 */
.vote-modal__body {
    padding: 16px 20px 20px;
    box-sizing: border-box;
}

/* 배지 + 닉네임 행 */
.vote-modal__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.vote-modal__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 14px;
    background: linear-gradient(90deg, #FE6155 0%, #EB288E 100%);
    border-radius: 52px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.vote-modal__nickname {
    font-size: 29px;
    font-weight: 700;
    color: #161616;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 코스어 이미지 박스 */
.vote-modal__img-box {
    width: 100%;
    aspect-ratio: 354 / 499;
    border-radius: 19px;
    background: #C7C7C7;
    overflow: hidden;
    margin-bottom: 16px;
}

.vote-modal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* X 닫기 버튼: PC에서 숨김, 모바일에서만 표시 */
.vote-modal__close-btn {
    display: none;
}

/* 액션 영역 (좋아요 + 공유) */
.vote-modal__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vote-modal__like-btn,
.vote-modal__share-btn {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.vote-modal__like-btn {
    gap: 6px;
}

.vote-modal__like-btn svg path {
    fill: none;
    stroke: #999999;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill 0.15s ease, stroke 0.15s ease;
}

.vote-modal__like-btn.is-liked svg path {
    fill: #FE6155;
    stroke: #FE6155;
}

.vote-modal__like-count {
    font-size: 29px;
    font-weight: 500;
    color: #000000;
    line-height: 38px;
}

/* ===== 모바일 전용 요소 스타일 (PC에서는 display:none) ===== */

/* 뒤로가기 행 */
.vote-modal__back-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.17px;
    font-weight: 500;
    color: #161616;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
/* 모바일 로고 섹션 */
.vote-modal__mobile-logo-section {
    text-align: center;
}

.vote-modal__mobile-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vote-modal__mobile-cosfe {
    font-size: 30px;
    font-weight: 900;
    background: linear-gradient(90deg, #FF6156, #EB288E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vote-modal__mobile-vote {
    font-size: 34.21px;
    font-weight: 700;
    color: #FF7939;
}

.vote-modal__mobile-subtitle {
    margin: 8px 0 0;
    font-size: 11.93px;
    font-weight: 300;
    color: #000000;
    font-family: 'Inter', sans-serif;
}

/* ===== 인피니트 스크롤 센티널 ===== */
.vote-sentinel {
    width: 100%;
    height: 1px;
}

.vote-empty-msg {
    text-align: center;
    padding: 48px 0;
    font-size: 14px;
    color: #999999;
    font-family: 'Inter', sans-serif;
}

/* ===== 카드 공유 팝업 ===== */
.vote-card__share-wrap {
    position: relative;
    display: inline-flex;
    margin-left: auto;
}

.vote-card__share-toggle {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.vote-card__share-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 4px);
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    padding: 4px;
    flex-direction: column;
    gap: 3px;
    z-index: 100;
    min-width: 110px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.vote-card__share-popup.is-open {
    display: flex;
}

.vote-card__share-popup .vote-share-btn {
    color: #161616;
}

.vote-card__share-popup .vote-share-btn:hover {
    background-color: #F5F5F5;
}

/* ===== 모달 공유 팝업 ===== */
.vote-modal__share-wrap {
    position: relative;
    display: inline-flex;
}

.vote-modal__share-toggle {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.vote-modal__share-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 4px;
    padding: 5px;
    flex-direction: column;
    gap: 4px;
    z-index: 9100;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.vote-modal__share-popup.is-open {
    display: flex;
}

.vote-modal__share-popup .vote-share-btn {
    color: #161616;
}

.vote-modal__share-popup .vote-share-btn:hover {
    background-color: #F5F5F5;
}

/* ===== 공유 버튼 아이콘 이미지 ===== */
.vote-share-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* ===== 공유 버튼 공통 ===== */
.vote-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: none;
    border: none;
    border-radius: 3px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s;
}

.vote-share-btn:hover {
    background-color: #333333;
}

/* ===== CAPTCHA 팝업 ===== */
.vote-captcha-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9200;
    background: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
}

.vote-captcha-modal.is-open {
    display: flex;
}

.vote-captcha-card {
    position: relative;
    width: 320px;
    background: #FFFFFF;
    border: 1.5px solid #EAAEAE;
    border-radius: 15px;
    padding: 30px 28px 28px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.vote-captcha-card__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #555555;
    cursor: pointer;
    padding: 2px;
}

.vote-captcha-card__close:hover {
    color: #1A1A1A;
}

.vote-captcha-card__title {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 10px;
    letter-spacing: -0.3px;
}

.vote-captcha-card__body {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #555555;
    margin: 0 0 16px;
    line-height: 1.6;
}

.vote-captcha-card__img-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.vote-captcha-card__img {
    flex: 1;
    height: 56px;
    border: 1px solid #DDDDDD;
    border-radius: 4px;
    background: #F7F7F7;
    display: block;
    object-fit: contain;
}

.vote-captcha-card__controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.vote-captcha-card__ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    background: none;
    border: 1px solid #DDDDDD;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.vote-captcha-card__ctrl-btn:hover {
    background-color: #F0F0F0;
}

.vote-captcha-card__input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #CCCCCC;
    border-radius: 4px;
    background-color: #F0F0F0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #333333;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 14px;
    transition: border-color 0.2s, background-color 0.2s;
}

.vote-captcha-card__input::placeholder {
    color: #AAAAAA;
}

.vote-captcha-card__input:focus {
    border-color: #EAAEAE;
    background-color: #FFFFFF;
}

.vote-captcha-card__submit {
    display: block;
    width: 100%;
    height: 40px;
    background-color: #1A1A1A;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.vote-captcha-card__submit:hover {
    background-color: #333333;
}

.vote-captcha-card__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================================
   RESPONSIVE — Tablet (768px ~ 1199px)
   ================================================ */
@media only screen and (max-width: 1199px) {

    .vote-content {
        padding: 32px 24px 64px;
    }

    .vote-card-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px 12px;
    }

    .vote-title {
        font-size: 28px;
    }
}

/* ================================================
   RESPONSIVE — Mobile (~ 767px)
   ================================================ */
@media only screen and (max-width: 767px) {

    .vote-content {
        padding: 20px 16px 48px;
        gap: 20px;
    }

    .vote-card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px 8px;
    }

    .vote-title {
        font-size: 22px;
    }

    .vote-subtitle {
        font-size: 13px;
        padding-bottom: 12px;
    }

    .vote-search-input {
        width: 180px;
    }

    /* ===== 모달: 모바일 전체화면 팝업 ===== */

    .vote-modal {
        background: #FFFFFF;
        align-items: stretch;
    }

    .vote-modal.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .vote-modal__inner {
        flex: 1;
        width: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        position: static;
        align-items: stretch;
    }

    .vote-modal__logo-wrap {
        display: none;
    }

    /* 헤더 영역(돌아가기 + 로고) 숨김 */
    .vote-modal__mobile-layout {
        display: none;
    }

    /* 컨테이너 → flex column으로 본문 꽉 채움 */
    .vote-modal__container {
        flex: 1;
        width: 100%;
        height: auto;
        max-height: none;
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
        background: #FFFFFF;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    /* 본문 → 전체화면 flex 컨테이너 */
    .vote-modal__body {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: #FFFFFF;
        border-radius: 0;
        padding: 16px 17px 20px;
        margin: 0;
        max-width: none;
        min-height: 0;
        box-sizing: border-box;
    }

    /* identity 행: 닉네임 말줄임 처리 */
    .vote-modal__identity {
        flex-shrink: 0;
    }

    .vote-modal__nickname {
        flex: 1;
        min-width: 0;
    }

    /* X 닫기 버튼 표시 */
    .vote-modal__close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-left: auto;
        background: none;
        border: none;
        padding: 4px;
        cursor: pointer;
    }

    .vote-modal__close-btn:hover svg path {
        stroke: #555;
    }

    /* 이미지 → 남은 공간 전체 차지 */
    .vote-modal__img-box {
        flex: 1;
        min-height: 0;
        aspect-ratio: unset;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    /* 액션 → 하단 고정 */
    .vote-modal__actions {
        flex-shrink: 0;
    }
}
