/* tosspayments-simple/assets/css/toss-form.css */

.tps-payment-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    box-sizing: border-box;
}

.tps-field {
    margin-bottom: 18px;
}

.tps-field label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}

.tps-field input[type="text"],
.tps-field input[type="email"],
.tps-field input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    box-sizing: border-box;
    transition: border-color .2s;
    outline: none;
}

.tps-field input:focus {
    border-color: #0064ff;
    box-shadow: 0 0 0 3px rgba(0,100,255,.1);
}

/* 결제수단 선택 버튼 */
.tps-method-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tps-method-btn {
    flex: 1;
    min-width: 90px;
    padding: 10px 8px;
    background: #f5f5f7;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    color: #444;
}

.tps-method-btn:hover {
    background: #e8f0fe;
    border-color: #0064ff;
    color: #0064ff;
}

.tps-method-btn.active {
    background: #0064ff;
    border-color: #0064ff;
    color: #fff;
}

/* 가상계좌 안내 */
.tps-va-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #795548;
    margin-bottom: 16px;
}
.tps-va-notice p { margin: 0; }

/* 고정 금액 요약 */
.tps-summary {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.tps-summary .tps-label {
    font-size: 13px;
    color: #888;
}
.tps-summary .tps-amount {
    font-size: 22px;
    font-weight: 700;
    color: #0064ff;
}
.tps-summary .tps-order-name {
    font-size: 13px;
    color: #444;
}

/* 에러 메시지 */
.tps-error {
    background: #fce8e6;
    border: 1px solid #f28b82;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c62828;
    margin-bottom: 14px;
}

/* 결제 버튼 */
.tps-pay-btn {
    width: 100%;
    padding: 14px;
    background: #0064ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    letter-spacing: -0.3px;
}

.tps-pay-btn:hover {
    background: #0052d9;
}

.tps-pay-btn:disabled {
    background: #b0c4f4;
    cursor: not-allowed;
}

/* ── 위젯 폼 스타일 ─────────────────────────────────────────── */
.tps-widget-wrap {
    max-width: 500px;
    margin: 0 auto;
}
.tps-widget-memo {
    background: #eef4ff;
    border-left: 4px solid #0064ff;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.7;
}
.tps-widget-memo p { margin: 0 0 8px; }
.tps-widget-memo p:last-child { margin-bottom: 0; }
.tps-widget-memo strong, .tps-widget-memo b { font-weight: 700; }
.tps-widget-memo em, .tps-widget-memo i { font-style: italic; }
.tps-widget-memo u { text-decoration: underline; }
.tps-widget-memo ul, .tps-widget-memo ol { margin: 6px 0 6px 20px; padding: 0; }
.tps-widget-memo li { margin-bottom: 3px; }
.tps-widget-memo img { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; }

/* ── 상품 설명 영역 ──────────────────────────────────────── */
.tps-widget-desc {
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
    line-height: 1.8;
}
.tps-widget-desc p { margin: 0 0 10px; }
.tps-widget-desc p:last-child { margin-bottom: 0; }
.tps-widget-desc img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; display: block; }
.tps-widget-desc ul, .tps-widget-desc ol { margin: 6px 0 6px 20px; padding: 0; }
.tps-widget-desc li { margin-bottom: 4px; }
.tps-widget-desc strong, .tps-widget-desc b { font-weight: 700; }
.tps-widget-desc em, .tps-widget-desc i { font-style: italic; }
.tps-widget-desc a { color: #0064ff; text-decoration: underline; }

/* ── 금액 상세 ───────────────────────────────────────────── */
.tps-summary-detail {
    width: 100%;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ── 수량 선택 ───────────────────────────────────────────── */
.tps-qty-field { margin-bottom: 16px; }
.tps-qty-wrap {
    display: inline-flex;
    align-items: stretch;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    overflow: hidden;
}
.tps-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #f5f5f7;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #444;
    flex-shrink: 0;
    min-height: 42px;
}
.tps-qty-input {
    width: 52px;
    border: none;
    border-left: 1.5px solid #dde1e7;
    border-right: 1.5px solid #dde1e7;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    background: #fff;
    -moz-appearance: textfield;
    padding: 0;
}
.tps-qty-input::-webkit-inner-spin-button,
.tps-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── 재고 없음 ───────────────────────────────────────────── */
.tps-out-of-stock {
    background: #fff0f0;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 12px;
    text-align: center;
}
.tps-pay-btn--oos {
    background: #d1d5db;
    cursor: not-allowed;
    color: #6b7280;
}
.tps-pay-btn--oos:hover { background: #d1d5db; }
.tps-widget-form {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    box-sizing: border-box;
}
.tps-widget-form .tps-field { margin-bottom: 16px; }
.tps-widget-form .tps-field label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 5px;
}
.tps-widget-form input[type="text"],
.tps-widget-form input[type="tel"],
.tps-widget-form input[type="email"],
.tps-widget-form input[type="number"],
.tps-widget-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    box-sizing: border-box;
    transition: border-color .2s;
    outline: none;
}
.tps-widget-form input:focus,
.tps-widget-form textarea:focus { border-color: #0064ff; box-shadow: 0 0 0 3px rgba(0,100,255,.1); }
.tps-widget-form textarea { resize: vertical; min-height: 80px; }
.tps-radio-group, .tps-checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.tps-option-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all .15s;
}
.tps-option-label:hover { border-color: #0064ff; color: #0064ff; }
.tps-option-label input[type="radio"]:checked ~ span,
.tps-option-label:has(input:checked) { border-color: #0064ff; background: #eef4ff; color: #0064ff; font-weight: 600; }

/* 위젯 상품명/금액 요약 */
.tps-widget-summary {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.tps-summary-name {
    font-size: 15px;
    color: #222;
}
.tps-summary-amount {
    font-size: 22px;
    font-weight: 700;
    color: #0064ff;
}

/* 캐러셀 카운터 텍스트 색상 */
.tps-counter-cur,
.tps-counter-total {
    color: #fff;
}

/* ── 안내 문구 필드 (memo 타입) ─────────────────────────────── */
.tps-field-memo {
    background: #eef4ff;
    border-left: 4px solid #0064ff;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

/* ── 배송지 주소 필드 (address 타입) ────────────────────────── */
.tps-addr-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tps-addr-row1 {
    display: flex;
    gap: 8px;
    align-items: center;
}
.tps-addr-postcode {
    width: 110px;
    flex-shrink: 0;
    padding: 10px 12px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fc;
    box-sizing: border-box;
    color: #333;
}
.tps-addr-btn {
    padding: 10px 14px;
    background: #0064ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.tps-addr-btn:hover { background: #0052d9; }
.tps-addr-road,
.tps-addr-detail {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    box-sizing: border-box;
    transition: border-color .2s;
    outline: none;
}
.tps-addr-road { background: #f8f9fc; }
.tps-addr-road:focus,
.tps-addr-detail:focus {
    border-color: #0064ff;
    box-shadow: 0 0 0 3px rgba(0,100,255,.1);
}

/* ── 고지문 영역 ─────────────────────────────────────────── */
.tps-legal-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    font-size: 13px;
}
.tps-legal-section {
    border-bottom: 1px solid #e2e8f0;
}
.tps-legal-section:last-of-type { border-bottom: none; }
.tps-legal-toggle {
    width: 100%;
    background: #f8fafc;
    border: none;
    padding: 11px 16px;
    text-align: left;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    transition: background .15s;
}
.tps-legal-toggle:hover { background: #eef4ff; color: #0064ff; }
.tps-legal-arrow { font-size: 11px; color: #aaa; }
.tps-legal-body {
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}
.tps-legal-head {
    font-size: 12px;
    color: #0064ff;
    display: block;
    margin-bottom: 4px;
}
.tps-legal-text {
    margin: 0;
    font-size: 12px;
    color: #555;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: keep-all;
}
.tps-legal-agree {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 16px;
    background: #f0fdf4;
    cursor: pointer;
    border-top: 1px solid #e2e8f0;
}
.tps-legal-agree input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #0064ff;
    flex-shrink: 0;
    cursor: pointer;
}
.tps-legal-agree span {
    font-size: 13px;
    color: #222;
}

/* ── 더블탭 확대 방지 (핀치 줌은 허용) ─────────────────── */
.tps-method-btn,
.tps-pay-btn,
.tps-pay-btn--oos,
.tps-qty-btn,
.tps-addr-btn,
.tps-legal-toggle,
.tps-legal-agree {
    touch-action: manipulation;
}
