/* ==========================================================================
   support-ticket.css — トラブル窓口の申立フォーム + 一覧 (P2-9 / P2-10)
   ==========================================================================
   /contact/ にだけ読み込む。legal.css の上に乗るので、色は legal 側の
   変数を使い、フォーム部品の見た目だけをここで決める。

   ⚠ **popunk テーマはこのページに入っていない** (トップページだけ)。
   もし将来 /contact/ に popunk を足すなら、position / border / shadow /
   min-* の未宣言プロパティが base から素通りするので、そこを明示すること。
   ========================================================================== */

.cm-ticket {
    margin: 24px 0 8px;
}

.cm-ticket-guest p {
    margin: 0;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 10px;
    background: rgba(0, 0, 0, .03);
    line-height: 1.8;
}

.cm-ticket-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    background: rgba(0, 0, 0, .02);
}

.cm-ticket-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cm-ticket-field label {
    font-weight: 700;
    font-size: .95rem;
}

.cm-ticket-field input,
.cm-ticket-field select,
.cm-ticket-field textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    color: inherit;
}

.cm-ticket-field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
}

.cm-ticket-hint,
.cm-ticket-count {
    margin: 0;
    font-size: .82rem;
    opacity: .72;
    line-height: 1.6;
}

.cm-ticket-count {
    text-align: right;
}

.cm-ticket-note {
    margin: 0;
    padding: 12px 14px;
    border-left: 3px solid rgba(0, 0, 0, .25);
    background: rgba(0, 0, 0, .03);
    font-size: .88rem;
    line-height: 1.8;
}

.cm-ticket-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cm-ticket-submit {
    padding: 11px 26px;
    border: 0;
    border-radius: 999px;
    background: #1f2937;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cm-ticket-submit:hover:not(:disabled) {
    opacity: .88;
}

.cm-ticket-submit:disabled {
    opacity: .5;
    cursor: default;
}

/* 送信結果。**色だけで伝えない** — 文言そのものが結果を言う。 */
.cm-ticket-msg {
    font-size: .88rem;
    line-height: 1.6;
}

.cm-ticket-msg.is-ok {
    color: #146c43;
}

.cm-ticket-msg.is-error {
    color: #b02a37;
}

.cm-ticket-list-head {
    margin: 36px 0 12px;
}

.cm-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cm-ticket-empty {
    margin: 0;
    opacity: .7;
    font-size: .92rem;
}

.cm-ticket-retry {
    margin-top: 8px;
    padding: 6px 16px;
    border: 1px solid rgba(0, 0, 0, .25);
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: .86rem;
    cursor: pointer;
}

.cm-ticket-item {
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 10px;
    background: #fff;
}

.cm-ticket-item-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.cm-ticket-badge {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .08);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.cm-ticket-status-in_review .cm-ticket-badge {
    background: rgba(13, 110, 253, .14);
    color: #0a58ca;
}

.cm-ticket-status-resolved .cm-ticket-badge {
    background: rgba(25, 135, 84, .14);
    color: #146c43;
}

.cm-ticket-status-rejected .cm-ticket-badge {
    background: rgba(108, 117, 125, .16);
    color: #495057;
}

.cm-ticket-kind {
    font-size: .84rem;
    opacity: .8;
}

.cm-ticket-time {
    margin-left: auto;
    font-size: .78rem;
    opacity: .6;
    white-space: nowrap;
}

.cm-ticket-item-subject {
    font-weight: 700;
    margin-bottom: 6px;
}

/* 改行を残す — 利用者が段落で書いた内容を 1 行に潰さない。 */
.cm-ticket-item-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: .92rem;
    line-height: 1.8;
}

.cm-ticket-item-resolution {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(25, 135, 84, .07);
    font-size: .9rem;
}

.cm-ticket-item-resolution p {
    margin: 6px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.8;
}

.cm-ticket-item-resolution .cm-ticket-time {
    margin-left: 8px;
}

@media (max-width: 560px) {
    .cm-ticket-form {
        padding: 16px 14px;
    }

    .cm-ticket-time {
        margin-left: 0;
        width: 100%;
    }
}
