/* 컨택트 기본 스킨 — 카드형 폼, 목록, 1:1 상담 대화 */

.ctc, .ctc *, .ctc *::before, .ctc *::after { box-sizing: border-box; }

.ctc {
    --ctc-brand: var(--zm-brand, #2677e3);
    --ctc-brand-hover: var(--zm-brand-hover, #1f66c6);
    --ctc-text: var(--zm-text, #222831);
    --ctc-sub: var(--zm-text-sub, #6b7684);
    --ctc-line: var(--zm-border, #e5e8ec);
    --ctc-bg: var(--zm-bg, #ffffff);
    --ctc-surface: var(--zm-surface, #f6f8fa);
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    color: var(--ctc-text);
    word-break: keep-all;
}

/* 폼 선택 탭 */
.ctc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 26px; padding: 0; list-style: none; }
.ctc-tabs li { margin: 0; }
.ctc-tabs a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ctc-line); font-size: 14px; font-weight: 600; color: var(--ctc-sub); }
.ctc-tabs a:hover { border-color: var(--ctc-brand); color: var(--ctc-brand); }
.ctc-tabs .is-active a { background: var(--ctc-brand); border-color: var(--ctc-brand); color: #fff; }

/* 머리말 */
.ctc-head { margin-bottom: 26px; }
.ctc-title { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.ctc-desc { margin: 0; font-size: 15px; line-height: 1.75; color: var(--ctc-sub); }

/* 폼 카드 */
.ctc-form { padding: 30px 32px 32px; background: var(--ctc-bg); border: 1px solid var(--ctc-line); border-radius: 18px; box-shadow: 0 14px 36px -24px rgba(17, 22, 30, .25); }
.ctc-row { display: block; padding: 0 0 22px; }
.ctc-row:last-of-type { padding-bottom: 4px; }
.ctc-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.ctc-req { margin-left: 5px; font-size: 12px; font-weight: 700; font-style: normal; color: #e5484d; }
.ctc-help { margin: 7px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ctc-sub); }

.ctc-form input[type="text"],
.ctc-form input[type="email"],
.ctc-form input[type="tel"],
.ctc-form input[type="number"],
.ctc-form input[type="date"],
.ctc-form input[type="password"],
.ctc-form select,
.ctc-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ctc-line);
    border-radius: 11px;
    background: var(--ctc-bg);
    color: var(--ctc-text);
    font: inherit;
    font-size: 14.5px;
    line-height: 1.6;
    transition: border-color .14s, box-shadow .14s;
}
.ctc-form textarea { min-height: 170px; resize: vertical; }
.ctc-form input:focus,
.ctc-form select:focus,
.ctc-form textarea:focus {
    outline: none;
    border-color: var(--ctc-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ctc-brand) 14%, transparent);
}
.ctc-form input[type="file"] { font-size: 13.5px; }

/* 선택형 */
.ctc-choice { display: inline-flex; align-items: center; gap: 7px; margin: 0 16px 8px 0; font-size: 14px; color: var(--ctc-text); cursor: pointer; }
.ctc-choice input { width: auto; }

/* 약관 상자 */
.ctc-agreement {
    max-height: 168px; overflow-y: auto;
    margin-bottom: 12px; padding: 16px 18px;
    background: var(--ctc-surface);
    border: 1px solid var(--ctc-line);
    border-radius: 12px;
    font-size: 13px; line-height: 1.75; color: var(--ctc-sub);
}

/* 버튼 */
.ctc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--ctc-line); }
.ctc-submit,
.ctc a.ctc-submit,
.ctc button.ctc-submit {
    display: inline-flex; align-items: center; justify-content: center;
    height: 48px; padding: 0 24px;
    border: 1px solid var(--ctc-brand); border-radius: 12px;
    background: var(--ctc-brand); color: #fff;
    font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
    cursor: pointer; transition: background .14s, border-color .14s;
}
.ctc-submit:hover, .ctc a.ctc-submit:hover, .ctc button.ctc-submit:hover { background: var(--ctc-brand-hover); border-color: var(--ctc-brand-hover); color: #fff; }
.ctc-link,
.ctc a.ctc-link,
.ctc button.ctc-link {
    display: inline-flex; align-items: center; justify-content: center;
    height: 48px; padding: 0 20px;
    border: 1px solid var(--ctc-line); border-radius: 12px;
    background: none; color: var(--ctc-text);
    font-size: 14.5px; font-weight: 700;
    cursor: pointer; transition: border-color .14s, color .14s;
}
.ctc-link:hover, .ctc a.ctc-link:hover, .ctc button.ctc-link:hover { border-color: var(--ctc-brand); color: var(--ctc-brand); }
.ctc-inline-form { display: inline-flex; margin: 0; }

/* 허니팟 */
.ctc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 목록 */
.ctc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ctc-table th, .ctc-table td { padding: 14px 12px; border-bottom: 1px solid var(--ctc-line); text-align: left; }
.ctc-table thead th { padding-bottom: 12px; border-bottom: 1px solid var(--ctc-line); font-size: 12.5px; font-weight: 700; color: var(--ctc-sub); }
.ctc-table tbody tr:hover { background: var(--ctc-surface); }
.ctc-nowrap { white-space: nowrap; }
.ctc-meta { font-size: 12.5px; color: var(--ctc-sub); }
.ctc-empty { padding: 60px 20px; text-align: center; font-size: 15px; color: var(--ctc-sub); }

/* 상세 표 */
.ctc-table-view { width: 100%; border-collapse: collapse; font-size: 14.5px; border-top: 1px solid var(--ctc-line); }
.ctc-table-view th, .ctc-table-view td { padding: 14px 14px; border-bottom: 1px solid var(--ctc-line); text-align: left; vertical-align: top; line-height: 1.75; }
.ctc-table-view th { width: 140px; font-weight: 700; color: var(--ctc-sub); background: var(--ctc-surface); }

/* 상태 */
.ctc-status { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.ctc-status-new { background: color-mix(in srgb, var(--ctc-brand) 12%, transparent); color: var(--ctc-brand); }
.ctc-status-ing { background: rgba(245, 158, 11, .14); color: #b45309; }
.ctc-status-done { background: rgba(22, 163, 74, .13); color: #15803d; }
.ctc-status-hold { background: rgba(107, 118, 132, .14); color: #4b5563; }

/* 접수 완료 */
.ctc-complete { padding: 60px 20px; text-align: center; }
.ctc-complete .ctc-title { margin-bottom: 12px; }

/* 1:1 상담 대화 */
.ctc-thread { margin-top: 36px; }
.ctc-thread-title { margin: 0 0 14px; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.ctc-thread-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ctc-thread-item { padding: 16px 18px; border: 1px solid var(--ctc-line); border-radius: 14px; background: var(--ctc-bg); }
.ctc-thread-item.ctc-thread-reply { background: color-mix(in srgb, var(--ctc-brand) 6%, transparent); border-color: color-mix(in srgb, var(--ctc-brand) 22%, transparent); }
.ctc-thread-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.ctc-thread-head b { font-weight: 800; }
.ctc-thread-item.ctc-thread-reply .ctc-thread-head b { color: var(--ctc-brand); }
.ctc-thread-head span { color: var(--ctc-sub); font-size: 12.5px; }
.ctc-thread-body { font-size: 14.5px; line-height: 1.75; }
.ctc-thread-form { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--ctc-surface); border-radius: 14px; }
.ctc-thread-label { font-size: 14px; font-weight: 700; }
.ctc-thread-form textarea { max-width: 100%; width: 100%; padding: 12px 14px; border: 1px solid var(--ctc-line); border-radius: 11px; background: var(--ctc-bg); font: inherit; font-size: 14.5px; line-height: 1.7; resize: vertical; }
.ctc-thread-form textarea:focus { outline: none; border-color: var(--ctc-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ctc-brand) 14%, transparent); }
.ctc-thread-form .ctc-submit { align-self: flex-start; }

@media (max-width: 640px) {
    .ctc { padding: 26px 16px 60px; }
    .ctc-form { padding: 22px 20px 24px; border-radius: 16px; }
    .ctc-table-view th { width: 100px; }
    .ctc-actions { flex-direction: column; align-items: stretch; }
    .ctc-inline-form, .ctc-inline-form button { width: 100%; }
}

/* 관리자 처리 (프론트) */
.ctc-admin { margin-top: 34px; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--ctc-brand) 26%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--ctc-brand) 4%, transparent); }
.ctc-admin-title { margin: 0 0 16px; font-size: 15px; font-weight: 800; color: var(--ctc-brand); }
.ctc-admin-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.ctc-admin-row label { font-size: 14px; font-weight: 700; }
.ctc-admin-row select { height: 44px; padding: 0 12px; border: 1px solid var(--ctc-line); border-radius: 11px; background: var(--ctc-bg); font: inherit; font-size: 14px; }
.ctc-admin-row .ctc-link { height: 44px; }
.ctc-admin-reply { display: flex; flex-direction: column; gap: 10px; }
.ctc-admin-reply textarea { max-width: 100%; width: 100%; padding: 12px 14px; border: 1px solid var(--ctc-line); border-radius: 11px; background: var(--ctc-bg); font: inherit; font-size: 14.5px; line-height: 1.7; resize: vertical; }
.ctc-admin-reply .ctc-submit { align-self: flex-start; }
