/* F-025 rev2: 쿠팡서류오류 사유 chip — 회차 상태에 따라 색상 분기 */
.cd-reason__chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background: #FFF1F3;
    border: 1px solid #FFD4DA;
    color: #FD213E;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    text-align: left;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
}

.cd-reason__chip:hover {
    background: #FFE3E8;
}

.cd-reason__chip--pending {
    background: #DBEAFE;
    border-color: #93C5FD;
    color: #1E40AF;
}

.cd-reason__chip--pending:hover {
    background: #BFDBFE;
}

.cd-reason__chip--rejected {
    background: #FEE2E2;
    border-color: #FCA5A5;
    color: #B91C1C;
}

.cd-reason__chip--rejected:hover {
    background: #FECACA;
}

/* F-025 rev2: popover 내부 row — label/value 시각 위계.
       - label: 11px 회색 (uppercase 느낌의 작은 캡션). 강조색은 반려 사유만.
       - value: 13px 진회색 본문. 메모/코멘트는 multiline pre-wrap.
       - row 간 12px 간격 + 마지막 row 만 0 (note 와 시각 분리).
       - note: 솔리드 separator (점선 폐기). */
.cd-tip-row {
    margin: 0 0 12px;
    padding: 0;
    line-height: 1.5;
}

.cd-tip-row:last-child {
    margin-bottom: 0;
}

.cd-tip-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    margin: 0 0 4px;
    letter-spacing: 0.01em;
}

.cd-tip-label--danger {
    color: #DC2626;
}

.cd-tip-label--info {
    color: #2563EB;
}

.cd-tip-value {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #111827;
    margin: 0;
    word-break: break-word;
}

.cd-tip-value--multiline {
    white-space: pre-wrap;
}

.cd-tip-note {
    margin: 14px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid #F3F4F6;
    font-size: 11px;
    color: #6B7280;
    line-height: 1.55;
}

.cd-tip-note b {
    color: #111827;
    font-weight: 600;
}

/* F-025 rev2: 쿠팡서류 재제출 모달.
       Design system: Trust & Authority (navy + slate + blue CTA).
       - WCAG AA 4.5:1 본문 대비, 키보드/스크린리더 친화, 부드러운 fade.
       - prefers-reduced-motion 존중. */
.cd-resubmit-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: cd-resubmit-fade 180ms ease-out;
}

@keyframes cd-resubmit-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cd-resubmit-pop {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .cd-resubmit-backdrop,
    .cd-resubmit-modal {
        animation: none;
    }
}

.cd-resubmit-modal {
    position: relative;
    background: #FFFFFF;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0F172A;
    animation: cd-resubmit-pop 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cd-resubmit-modal__header {
    position: relative;
    padding: 18px 52px 14px 22px;
    border-bottom: 1px solid #E2E8F0;
    flex-shrink: 0;
}

.cd-resubmit-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #0F172A;
}

.cd-resubmit-modal__subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #64748B;
}

.cd-resubmit-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    border-radius: 6px;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 150ms ease, color 150ms ease;
}

.cd-resubmit-modal__close:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.cd-resubmit-modal__close:focus-visible {
    outline: 2px solid #0369A1;
    outline-offset: 1px;
}

.cd-resubmit-modal__body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    flex: 1;
}

.cd-resubmit-modal__footer {
    padding: 14px 22px;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: #F8FAFC;
    flex-shrink: 0;
}

.cd-resubmit-modal__section-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 6px;
    letter-spacing: 0.01em;
}

.cd-resubmit-modal__section-title-required::after {
    content: ' *';
    color: #DC2626;
}

/* 반려 사유 alert — Trust & Authority 의 inline notice 스타일 */
.cd-resubmit-modal__notice {
    padding: 12px 14px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 3px solid #DC2626;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.55;
    color: #7F1D1D;
}

.cd-resubmit-modal__notice-title {
    font-size: 11px;
    font-weight: 700;
    color: #DC2626;
    margin: 0 0 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cd-resubmit-modal__notice-reasons {
    color: #0F172A;
    font-weight: 500;
    word-break: break-word;
}

.cd-resubmit-modal__notice-memo {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #FECACA;
    color: #475569;
    white-space: pre-wrap;
    word-break: break-word;
    font-weight: 400;
}

/* 안내 박스 — 첫 제출 시 / pending 후 등에 사용 */
.cd-resubmit-modal__hint {
    padding: 10px 12px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 6px;
    font-size: 12px;
    color: #075985;
    line-height: 1.5;
}

/* textarea */
.cd-resubmit-modal__textarea {
    width: 100%;
    min-height: 84px;
    padding: 10px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.55;
    font-family: inherit;
    color: #0F172A;
    background: #FFFFFF;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.cd-resubmit-modal__textarea::placeholder {
    color: #94A3B8;
}

.cd-resubmit-modal__textarea:hover {
    border-color: #94A3B8;
}

.cd-resubmit-modal__textarea:focus,
.cd-resubmit-modal__textarea:focus-visible {
    outline: none;
    border-color: #0369A1;
    box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.15);
}

.cd-resubmit-modal__counter {
    margin-top: 4px;
    font-size: 11px;
    color: #94A3B8;
    text-align: right;
}

/* 파일 dropzone — 브라우저 기본 input 숨기고 정돈된 UI */
.cd-resubmit-modal__dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border: 1.5px dashed #CBD5E1;
    border-radius: 8px;
    background: #F8FAFC;
    text-align: center;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.cd-resubmit-modal__dropzone:hover {
    border-color: #0369A1;
    background: #F0F9FF;
}

.cd-resubmit-modal__dropzone--has-file {
    border-style: solid;
    border-color: #0EA5E9;
    background: #F0F9FF;
}

.cd-resubmit-modal__dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.cd-resubmit-modal__dropzone-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    color: #64748B;
}

.cd-resubmit-modal__dropzone--has-file .cd-resubmit-modal__dropzone-icon {
    color: #0369A1;
}

.cd-resubmit-modal__dropzone-title {
    font-size: 13px;
    font-weight: 600;
    color: #0F172A;
    margin: 0;
}

.cd-resubmit-modal__dropzone-sub {
    font-size: 11px;
    color: #64748B;
    margin: 2px 0 0;
}

.cd-resubmit-modal__dropzone-filename {
    font-size: 13px;
    color: #0F172A;
    margin: 0;
    word-break: break-all;
    max-width: 100%;
}

.cd-resubmit-modal__dropzone-meta {
    font-size: 11px;
    color: #64748B;
    margin: 2px 0 0;
}

/* 3단계 progress */
.cd-resubmit-modal__progress {
    min-height: 18px;
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cd-resubmit-modal__progress[data-state="working"] {
    color: #0369A1;
}

.cd-resubmit-modal__progress[data-state="error"] {
    color: #B91C1C;
}

.cd-resubmit-modal__progress[data-state="success"] {
    color: #15803D;
}

.cd-resubmit-modal__spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #E0F2FE;
    border-top-color: #0369A1;
    border-radius: 50%;
    animation: cd-resubmit-spin 700ms linear infinite;
    flex-shrink: 0;
}

@keyframes cd-resubmit-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cd-resubmit-modal__spinner {
        animation: none;
    }
}

/* 버튼 — Trust & Authority CTA: #0369A1 */
.cd-resubmit-modal__btn-cancel,
.cd-resubmit-modal__btn-submit {
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
    font-family: inherit;
}

.cd-resubmit-modal__btn-cancel {
    border: 1px solid #CBD5E1;
    background: #FFFFFF;
    color: #334155;
}

.cd-resubmit-modal__btn-cancel:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
    color: #0F172A;
}

.cd-resubmit-modal__btn-cancel:focus-visible {
    outline: 2px solid #0369A1;
    outline-offset: 1px;
}

.cd-resubmit-modal__btn-submit {
    border: 1px solid #0369A1;
    background: #0369A1;
    color: #FFFFFF;
}

.cd-resubmit-modal__btn-submit:hover {
    background: #075985;
    border-color: #075985;
}

.cd-resubmit-modal__btn-submit:focus-visible {
    outline: 2px solid #0369A1;
    outline-offset: 1px;
    box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.25);
}

.cd-resubmit-modal__btn-submit:disabled,
.cd-resubmit-modal__btn-cancel:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* #230: 업로드된 쿠팡 서류 목록 (출력/다운로드/삭제) */
.cd-doc-list-wrap {
    margin-top: 4px;
}

.cd-doc-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.cd-doc-empty {
    padding: 14px 12px;
    font-size: 12.5px;
    color: #94A3B8;
    text-align: center;
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    border-radius: 6px;
}

.cd-doc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #FFFFFF;
}

.cd-doc-item__icon {
    flex-shrink: 0;
    color: #0369A1;
    display: inline-flex;
}

.cd-doc-item__icon svg {
    width: 18px;
    height: 18px;
}

.cd-doc-item__name {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    color: #1E293B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-doc-item__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.cd-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border: 1px solid #CBD5E1;
    border-radius: 5px;
    background: #FFFFFF;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.cd-doc-btn svg {
    width: 13px;
    height: 13px;
}

.cd-doc-btn:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
}

.cd-doc-btn--delete {
    color: #B91C1C;
    border-color: #FCA5A5;
}

.cd-doc-btn--delete:hover {
    background: #FEF2F2;
    border-color: #F87171;
}

.cd-doc-btn:focus-visible {
    outline: 2px solid #0369A1;
    outline-offset: 1px;
}

.cd-reason__chip:focus-visible {
    outline: 2px solid #FD213E;
    outline-offset: 2px;
}

/* F-025 rev2: popover 컨테이너 — 부드러운 카드, 충분한 padding, 명확한 row 분리 */
.cd-reason__tip[hidden] {
    display: none;
}

.cd-reason__tip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: 280px;
    max-width: calc(100vw - 32px);
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
    text-align: left;
    font-size: 12px;
    line-height: 1.5;
}

/* 레거시 tip-head/body/note 호환 (다른 페이지에서 사용 시) */
.cd-reason__tip-head {
    margin: 0 0 4px;
    font-weight: 600;
    color: #111827;
}

.cd-reason__tip-body {
    margin: 0 0 8px;
    color: #4B5563;
}

.cd-reason__tip-note {
    margin: 6px 0 0;
    padding-top: 6px;
    border-top: 1px solid #F3F4F6;
    color: #6B7280;
}

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    text-decoration: none;
    user-select: none;
    transition: background 0.3s;
}

.modal-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.modal-arrow.prev {
    left: 10px;
}

.modal-arrow.next {
    right: 10px;
}

.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    z-index: 10;
}

/* 배송현황 목록 카드 행 — common.css 의 padding 34px 15px 이 과해 행 높이 축소 */
.order-table-box > ul > li .list-head table thead tr th {
    padding: 20px 15px;
}

/* 구매비용/배송비용 셀 — flex 컨테이너라 th 의 text-align:center 가 안 먹음. 금액+아이콘 가운데 정렬 */
.order-table-price-box {
    justify-content: center;
}
