/* safety_form v2 skin 스타일 */

/* 기본 레이아웃 */
.sf-wrap,
.sf-view-wrap {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.sf-list-wrap {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.sf-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

.sf-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    padding: 30px 24px;
}

/* 테이블 폼 */
.sf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.sf-table th,
.sf-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.sf-table th {
    text-align: left;
    font-weight: 600;
    color: #555;
    width: 140px;
    vertical-align: middle;
}

.sf-table td {
    vertical-align: middle;
}

/* 인풋 */
.sf-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    box-sizing: border-box;
}

.sf-input:focus,
.sf-textarea:focus,
.sf-email select:focus {
    outline: none;
    border-color: #4a3fe4;
    box-shadow: 0 0 0 1px rgba(123,63,228,0.15);
}

.sf-textarea {
    width: 100%;
    min-height: 160px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

/* 이메일 박스 */
.sf-email {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sf-email-local {
    flex: 0 0 40%;
}

.sf-email-at {
    flex: 0 0 auto;
}

.sf-email-domain {
    flex: 1 1 auto;
}

/* 버튼 */
.sf-submit {
    margin-top: 24px;
    text-align: center;
}

.sf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    height: 56px;
    padding: 0 24px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    background: #3032c7;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

.sf-btn:hover {
    background: #2927b6;
}

/* 목록 테이블 */
.sf-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sf-list-table th,
.sf-list-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.sf-list-table th {
    background: #fafafa;
    font-weight: 600;
}

.sf-td-subject {
    text-align: left;
}

.sf-td-subject a {
    color: #333;
    text-decoration: none;
}

.sf-td-subject a:hover {
    text-decoration: underline;
}

.sf-list-empty {
    padding: 40px 0;
    text-align: center;
    color: #888;
}

.sf-list-btns {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.sf-btn-line {
    min-width: 120px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    font-size: 13px;
}

.sf-btn-primary {
    min-width: 140px;
    height: 40px;
    border-radius: 6px;
    background: #303ac7;
    color: #fff;
    font-size: 13px;
    border: none;
}

.sf-paging {
    margin-top: 16px;
    text-align: center;
}

.sf-paging .pg_page,
.sf-paging .pg_current {
    display: inline-block;
    padding: 4px 8px;
    margin: 0 2px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 13px;
}

.sf-paging .pg_current {
    background: #303ac7;
    color: #fff;
    border-color: #303ac7;
}

/* 상태 배지 */
.sf-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 26px;
    border-radius: 20px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.sf-state-ok {
    background: #2d9c4f;
}

.sf-state-hold {
    background: #f2994a;
}

.sf-state-wait {
    background: #4656e5;
}

.sf-state-view {
    min-width: 90px;
}

.sf-view-meta {
    margin-top: 12px;
    font-size: 12px;
    color: #777;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ===========================
   Custom Radio / Checkbox
   =========================== */
.custom-choice {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.custom-choice input[type=radio],
.custom-choice input[type=checkbox] {
    display: none;
}

.custom-choice label {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    user-select: none;
}

.custom-choice label:hover {
    color: #2f3be0; /* hover 시 보라색 */
}

/* ○ 라디오 기본 원형 */
.custom-choice label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid #aaa;
    border-radius: 50%;
    background: #fff;
    transition: all .2s;
}

/* ● 선택된 상태 */
.custom-choice input[type=radio]:checked + label:before {
    border-color: #303ac7;
    background: radial-gradient(circle, #303ac7 45%, white 46%);
}

/* ■ 체크박스 */
.custom-choice.checkbox label:before {
    border-radius: 5px; /* 네모 */
}

/* 체크박스 체크된 상태 */
.custom-choice.checkbox input[type=checkbox]:checked + label:before {
    background: #303ac7;
    border-color: #303ac7;
}

/* 체크표시 (✔) */
.custom-choice.checkbox input[type=checkbox]:checked + label:after {
    content: "✔";
    position: absolute;
    left: 3px;
    top: -1px;
    font-size: 16px;
    color: #fff;
    font-weight: bold;
}

/* 반응형 */
@media (max-width: 768px) {
    .sf-card {
        padding: 20px 16px;
    }
    .sf-title {
        font-size: 24px;
    }
    .sf-table th,
    .sf-table td {
        display: block;
        width: 100%;
    }
    .sf-table th {
        border-bottom: none;
        padding-bottom: 4px;
    }
    .sf-table td {
        padding-top: 0;
        border-bottom: 1px solid #eee;
    }
    .sf-email {
        flex-direction: column;
        align-items: stretch;
    }
    .sf-email-local,
    .sf-email-domain {
        flex: 1 1 auto;
        width: 100%;
    }
    .sf-list-table th:nth-child(2),
    .sf-list-table td:nth-child(2) {
        display: none; /* 선물유형 컬럼 숨김 (모바일) */
    }
}
