/* deblur.me statement refund. Same bottom sheet as the payment-link request.
   The email section is the only part that swaps when the code boxes appear. */

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

#refund-scrim[hidden],
#refund-sheet[hidden],
#refund-sheet [hidden] { display: none !important; }

#refund-scrim {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(0,0,0,0.45);
}

#refund-sheet {
    --accent-solid: var(--accent);
    --danger: var(--red, #ef4444);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 81;
    width: 100%; max-width: 440px; margin: 0 auto;
    height: auto;
    max-height: 85vh; max-height: 85lvh;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--bg); color: var(--text); text-align: left;
    border-radius: 36px 36px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.35);
    padding: 22px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
}

#refund-sheet h2 {
    font-size: 20px; font-weight: 700; line-height: 1.25;
    margin: 0 0 10px; padding-right: 56px; text-align: left; color: var(--text);
}
#refund-sheet p { font-size: 14px; line-height: 1.35; color: var(--text-secondary); margin: 0 0 10px; }
#refund-sheet-intro { line-height: 1.3; margin: 0 0 8px; }
#refund-sheet label {
    display: block; margin: 10px 0 6px;
    font-size: 13px; font-weight: 600; color: var(--text);
}
#refund-sheet .pay-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text);
    font: inherit; font-size: 16px;
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}
#refund-sheet .pay-input:focus,
#refund-sheet .pay-input:focus-visible {
    outline: none;
    border-color: #8e8e93;
    box-shadow: none;
}
#refund-sheet .pay-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent-solid);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
}
#refund-sheet .pay-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.refund-paid {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 16px; padding: 0;
    background: none;
    color: var(--text-secondary); font-size: 14px; font-weight: 500; line-height: 1;
}
.refund-brand { height: 16px; width: auto; display: block; flex: 0 0 auto; }
.refund-wallet { width: 18px; height: 18px; flex: 0 0 auto; display: block; }
#refund-paid-last4 { letter-spacing: 0.04em; }
.refund-paid-dot {
    display: block; width: 3px; height: 3px; border-radius: 50%;
    background: var(--text-muted); flex: 0 0 auto;
}
#refund-paid-amount { color: var(--text); font-weight: 600; white-space: nowrap; }

#refund-sheet:has(#refund-evidence) #refund-email-block { padding-top: 16px; }
#refund-sheet:has(#refund-evidence) #refund-email-label { margin-top: 0; }
.refund-email-row { position: relative; }
.refund-email-row.is-verify #refund-email { padding-right: 132px; }
#refund-email-verify {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    height: 32px; padding: 0 12px;
    border: 0; border-radius: 8px;
    background: var(--accent-solid); color: #fff;
    font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
#refund-email-verify:disabled { opacity: 0.6; cursor: wait; }
#refund-email-verify.is-loading { color: transparent; cursor: wait; }
#refund-email-verify.is-loading:disabled { opacity: 1; }
#refund-email-verify.is-loading::after {
    content: "";
    position: absolute; left: 50%; top: 50%;
    width: 14px; height: 14px; margin: -7px 0 0 -7px;
    border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
#refund-sheet .refund-email-note {
    margin: 8px 0 0 !important;
    font-size: 12px !important; line-height: 1.4 !important;
    color: var(--text-muted) !important;
}
.notify-otp { display: flex; gap: 8px; margin: 0 0 8px; }
.notify-otp-cell {
    flex: 1 1 0; min-width: 0; width: 100%;
    height: 58px; padding: 0;
    text-align: center;
    font: inherit; font-size: 16px; font-weight: 500;
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: 16px;
    caret-color: var(--text);
}
.notify-otp-cell:focus { outline: none; border-color: transparent; }
#refund-otp.is-loading .notify-otp-cell { opacity: 0.55; }
.notify-resend {
    display: block; width: 100%;
    margin: 0 0 4px; padding: 8px 0;
    background: none; border: 0;
    font: inherit; font-size: 13px; font-weight: 600;
    color: var(--text-muted); text-align: center; cursor: pointer;
}
.notify-resend:disabled { cursor: default; opacity: 0.7; }
#refund-evidence { margin-top: 32px; }
.refund-reasons { border: 0; margin: 0; padding: 0; }
.refund-reasons legend {
    padding: 0; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--text);
}
#refund-sheet .refund-reason {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 16px 0 0; padding: 0;
    background: none;
    font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--text);
}
#refund-sheet .refund-reason input {
    margin: 3px 0 0; flex: 0 0 auto;
    accent-color: var(--accent);
    background: none;
}
.refund-drop {
    margin-top: 32px; padding: 16px 12px;
    border: 1.5px dashed var(--text-muted); border-radius: 14px;
    text-align: center; cursor: pointer;
}
.refund-drop.is-over { border-color: var(--text); }
#refund-drop-title { margin: 0; color: var(--text); font-weight: 500; }
.refund-drop-hint {
    margin: 4px 0 0 !important; font-size: 12px !important; color: var(--text-muted) !important;
}
.refund-shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.refund-shot { position: relative; width: 64px; }
.refund-shot img, .refund-shot-file {
    width: 64px; height: 64px; border-radius: 8px; background: var(--bg-elevated);
}
.refund-shot img { object-fit: cover; display: block; }
.refund-shot-file {
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; color: var(--text-secondary);
}
.refund-shot button {
    position: absolute; top: -6px; right: -6px;
    width: 22px; height: 22px; padding: 0;
    border: 0; border-radius: 999px;
    background: var(--text); color: var(--bg);
    font-size: 14px; line-height: 22px; cursor: pointer;
}
.refund-error { color: var(--danger) !important; font-size: 13px !important; margin: 10px 0 0 !important; }
#refund-sheet:has(#refund-evidence) #refund-send { margin-top: 24px; }
#refund-send.is-loading { color: transparent; cursor: wait; position: relative; }
#refund-send.is-loading:disabled { opacity: 1; }
#refund-send.is-loading::after {
    content: "";
    position: absolute; left: 50%; top: 50%;
    width: 16px; height: 16px; margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
.refund-sheet-tools {
    position: absolute; top: 14px; right: 14px; z-index: 2;
}
.refund-sheet-close {
    width: 41.04px; height: 41.04px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid transparent; border-radius: 9999px;
    background: var(--bg-elevated); color: var(--text); cursor: pointer;
}
.refund-sheet-close svg { width: 20.52px; height: 20.52px; }
#refund-done h2 { padding-right: 56px; }
#refund-done p { color: var(--text-secondary); }
