/* ============================================================
   BLUETRAVEL 맞춤 컨설팅 - 커스텀 폼 요소
   /consult/application/css/form-elements.css
   ============================================================ */

/* ===== 1. CHECKBOX (체크박스) ===== */
.cb-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 3px 14px;
    border-radius: 8px;
    transition: background 0.15s;
    user-select: none;
}
.cb-custom:hover { background: #f8f8fc; }
.cb-custom input { display: none; }

.cb-box {
    width: 22px; height: 22px;
    border-radius: 6px;
    border: 2px solid #c5c5d0;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;

    border-radius: 8px;
    border: 3px solid #ddd;
    background: #fdfdfd;
}
.cb-box svg {
    width: 14px; height: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cb-custom input:checked + .cb-box {
    background: #1a1a4e;
    border-color: #1a1a4e;
}
.cb-custom input:checked + .cb-box svg {
    opacity: 1;
    transform: scale(1);
}

.cb-text { font-weight:500; font-size: 15px; color: #000; }
.cb-desc { font-weight:400; font-size: 13px; color: #555353; margin-top: 2px; display: block; }

/* 체크박스 SVG 마크업:
   <svg viewBox="0 0 14 14" fill="none">
     <path d="M2.5 7.5L5.5 10.5L11.5 4" stroke="#fff" stroke-width="2"
           stroke-linecap="round" stroke-linejoin="round"/>
   </svg>
*/


/* ===== 2. RADIO (라디오 버튼) ===== */
.rd-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.15s;
    user-select: none;
}
.rd-custom:hover { background: #f8f8fc; }
.rd-custom input { display: none; }

.rd-dot {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid #c5c5d0;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.rd-dot::after {
    content: '';
    width: 0; height: 0;
    border-radius: 50%;
    background: #fff;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rd-custom input:checked + .rd-dot {
    background: #1a1a4e;
    border-color: #1a1a4e;
}
.rd-custom input:checked + .rd-dot::after {
    width: 8px; height: 8px;
}
.rd-text { font-size: 15px; color: #333; }


/* ===== 3. TOGGLE SWITCH (토글) ===== */
.tg-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background 0.15s;
    user-select: none;
}
.tg-custom:hover { background: #f8f8fc; }
.tg-custom input { display: none; }

.tg-track {
    width: 44px; height: 24px;
    border-radius: 12px;
    background: #c5c5d0;
    position: relative;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.tg-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tg-custom input:checked + .tg-track { background: #1a1a4e; }
.tg-custom input:checked + .tg-track .tg-thumb { transform: translateX(20px); }
.tg-text { font-size: 15px; color: #333; }


/* ===== 4. CARD SELECTION (카드형 선택) ===== */
.card-select {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cs-item { flex: 1; min-width: 140px; }
.cs-item input { display: none; }

.cs-item label {
    display: block;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cs-item label::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: #1a1a4e;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cs-item label:hover {
    border-color: #bbb;
    background: #f8f8fc;
}
.cs-item input:checked + label {
    border-color: #1a1a4e;
    background: #eeedfe;
}
.cs-item input:checked + label::before {
    transform: scaleX(1);
}
.cs-name { font-size: 15px; font-weight: 500; color: #333; }
.cs-sub  { font-size: 12px; color: #888; margin-top: 4px; }


/* ===== 5. CHIP / PILL (칩형 다중선택) ===== */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip-item input { display: none; }

.chip-item label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    color: #888;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}
.chip-item label:hover {
    border-color: #bbb;
    color: #333;
}
.chip-item input:checked + label {
    background: #1a1a4e;
    border-color: #1a1a4e;
    color: #fff;
}
.chip-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    transition: transform 0.2s;
}
.chip-item input:checked + label .chip-dot {
    transform: scale(1.5);
}


/* ===== 6. AGREEMENT CARD (동의 카드) ===== */
.agree-card {
    display: flex;
    gap: 10px;
}
.ag-item { flex: 1; }
.ag-item input { display: none; }

.ag-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #888;
    transition: all 0.2s;
}
.ag-item label:hover { border-color: #bbb; }
.ag-item input:checked + label {
    border-color: #1a1a4e;
    color: #1a1a4e;
    background: #eeedfe;
    font-weight: 500;
}











/* 모든 #1a1a4e → var(--b24-blue) 로 변경 */
/* 모든 #eeedfe → var(--bg-highlight) 로 변경 */
/* 모든 #c5c5d0 → var(--border-default) 로 변경 */
/* 모든 #f8f8fc → var(--bg-light) 로 변경 */
/* 모든 #888 → var(--text-muted) 로 변경 */
/* 모든 #333 → var(--text-primary) 로 변경 */
/* 모든 #534AB7 → var(--b24-blue) 로 변경 (보라 → 블루) */

/* 예시: 체크박스 checked */
.cb-custom input:checked + .cb-box {
    background: var(--b24-blue);
    border-color: var(--b24-blue);
}

/* 예시: 칩 checked */
.chip-item input:checked + label {
    background: var(--b24-blue);
    border-color: var(--b24-blue);
    color: #fff;
}

/* 예시: 카드 선택 */
.cs-item input:checked + label {
    border-color: var(--b24-blue);
    background: var(--bg-highlight);
}
.cs-item label::before {
    background: var(--consult);  /* 상단 바는 오렌지 액센트 */
}

/* 예시: 동의 카드 */
.ag-item input:checked + label {
    border-color: var(--b24-blue);
    color: var(--b24-blue);
    background: var(--bg-highlight);
}





.cb-box {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border: 1px dashed #a3a3a3;
    background: #f7f7f7;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.cb-box img {
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cb-custom input:checked + .cb-box {
    background: linear-gradient(271deg, rgb(255 186 128) 0%, rgb(255 120 0) 55%, rgb(213 98 0) 100%);
    border: 0;
}
.cb-custom input:checked + .cb-box img {
    opacity: 1;
    transform: scale(1);
}