/* WC Withdrawal Pro v2.0.0 — withdrawal.css */
:root {
    --wcwp-primary: #1a1a2e;
    --wcwp-accent:  #e94560;
    --wcwp-success: #22c55e;
    --wcwp-border:  #e2e8f0;
    --wcwp-bg:      #f8fafc;
    --wcwp-text:    #1e293b;
    --wcwp-muted:   #64748b;
    --wcwp-radius:  8px;
    --wcwp-shadow:  0 20px 60px rgba(0,0,0,.2);
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.wcwp-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: wcwp-fade .18s ease;
}
@keyframes wcwp-fade { from{opacity:0} to{opacity:1} }
.wcwp-overlay--success { z-index: 100000; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.wcwp-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%; max-width: 540px;
    max-height: 92vh;
    display: flex; flex-direction: column;
    box-shadow: var(--wcwp-shadow);
    animation: wcwp-up .2s ease;
    overflow: hidden;
}
@keyframes wcwp-up { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }

.wcwp-modal__header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 20px 24px;
    background: var(--wcwp-primary); color: #fff;
    flex-shrink: 0;
}
.wcwp-modal__header-text { flex: 1; }
.wcwp-modal__title { margin: 0; font-size: 17px; font-weight: 700; color: #fff; line-height: 1.2; }
.wcwp-modal__subtitle { margin: 4px 0 0; font-size: 13px; color: rgba(255,255,255,.65); }
.wcwp-modal__close {
    background: none; border: none; color: rgba(255,255,255,.6);
    cursor: pointer; padding: 4px; display: flex; align-items: center;
    transition: color .15s; flex-shrink: 0; margin-left: 12px;
}
.wcwp-modal__close:hover { color: #fff; }

/* ── Steps indicator ─────────────────────────────────────────────────────── */
.wcwp-steps {
    display: flex; align-items: center; justify-content: center;
    padding: 14px 24px;
    background: #f8fafc;
    border-bottom: 1px solid var(--wcwp-border);
    flex-shrink: 0;
    gap: 0;
}
.wcwp-step {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--wcwp-muted);
    transition: color .2s;
}
.wcwp-step__num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #e2e8f0; color: var(--wcwp-muted);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    transition: background .2s, color .2s;
}
.wcwp-step--active .wcwp-step__num { background: var(--wcwp-primary); color: #fff; }
.wcwp-step--active { color: var(--wcwp-primary); }
.wcwp-step--done .wcwp-step__num { background: var(--wcwp-success); color: #fff; }
.wcwp-step__connector { flex: 1; max-width: 60px; height: 2px; background: var(--wcwp-border); margin: 0 12px; }

/* ── Body ────────────────────────────────────────────────────────────────── */
.wcwp-modal__body { padding: 20px 24px; overflow-y: auto; flex: 1; }

.wcwp-modal__intro {
    font-size: 13px; color: var(--wcwp-muted); line-height: 1.6;
    margin: 0 0 18px; padding-bottom: 14px;
    border-bottom: 1px solid var(--wcwp-border);
}

/* ── Fields ──────────────────────────────────────────────────────────────── */
.wcwp-modal__row { display: flex; gap: 12px; }
.wcwp-modal__row .wcwp-modal__field { flex: 1; }
.wcwp-modal__field { margin-bottom: 14px; }
.wcwp-modal__field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px; font-weight: 600;
    color: var(--wcwp-text); margin-bottom: 4px;
}
.wcwp-modal__field input[type=text],
.wcwp-modal__field input[type=email],
.wcwp-modal__field textarea {
    width: 100%; padding: 9px 11px;
    border: 1.5px solid var(--wcwp-border); border-radius: 6px;
    font-size: 14px; color: var(--wcwp-text); background: #fff;
    box-sizing: border-box; font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.wcwp-modal__field input:focus,
.wcwp-modal__field textarea:focus {
    outline: none; border-color: var(--wcwp-primary);
    box-shadow: 0 0 0 3px rgba(26,26,46,.1);
}
.wcwp-modal__field input.wcwp-invalid,
.wcwp-modal__field textarea.wcwp-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.08);
}
.wcwp-readonly { background: var(--wcwp-bg) !important; color: var(--wcwp-muted) !important; cursor: default; }
.wcwp-hint { display: block; font-size: 11px; color: #94a3b8; margin-top: 3px; line-height: 1.4; }
.wcwp-req { color: var(--wcwp-accent); }
.wcwp-opt { font-size: 11px; font-weight: 400; color: #94a3b8; }

/* ── Items list ──────────────────────────────────────────────────────────── */
.wcwp-items-list {
    border: 1.5px solid var(--wcwp-border);
    border-radius: 6px; overflow: hidden; margin-bottom: 8px;
}
.wcwp-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--wcwp-border);
    transition: background .12s;
    user-select: none;
}
.wcwp-item-row:last-child { border-bottom: none; }
.wcwp-item-row:hover:not(.wcwp-item--ineligible) { background: var(--wcwp-bg); }
.wcwp-item-row input[type=checkbox] {
    width: 16px; height: 16px; min-width: 16px;
    flex-shrink: 0; accent-color: var(--wcwp-primary);
    cursor: pointer; margin: 0;
}
.wcwp-item-thumb {
    width: 44px; height: 44px; min-width: 44px;
    object-fit: cover; border-radius: 5px;
    border: 1px solid var(--wcwp-border);
    background: var(--wcwp-bg);
}
.wcwp-item-thumb-placeholder {
    width: 44px; height: 44px; min-width: 44px;
    background: var(--wcwp-bg); border-radius: 5px;
    border: 1px solid var(--wcwp-border);
}
.wcwp-item-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 2px;
}
.wcwp-item-name {
    font-size: 13px; font-weight: 600; color: var(--wcwp-text);
    display: block; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wcwp-item-sku { font-size: 11px; color: #94a3b8; display: block; }
.wcwp-item-right {
    display: flex; flex-direction: column;
    align-items: flex-end; gap: 2px; flex-shrink: 0;
}
.wcwp-item-qty { font-size: 12px; color: var(--wcwp-muted); }
.wcwp-item-price { font-size: 13px; font-weight: 600; color: var(--wcwp-text); white-space: nowrap; }
.wcwp-item--ineligible { opacity: .45; cursor: not-allowed; }
.wcwp-item--ineligible input[type=checkbox] { cursor: not-allowed; }
.wcwp-item-ineligible-note { font-size: 11px; color: #ef4444; display: block; }
.wcwp-items-loading { padding: 16px; text-align: center; color: var(--wcwp-muted); font-size: 13px; }
.wcwp-select-all-label { font-size: 12px; color: var(--wcwp-muted); cursor: pointer; display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.wcwp-select-all-label input { accent-color: var(--wcwp-primary); width: 14px; height: 14px; }

/* ── Terms ───────────────────────────────────────────────────────────────── */
.wcwp-terms-wrap { margin-bottom: 12px; }
.wcwp-terms-label {
    display: flex !important; align-items: flex-start; gap: 10px;
    cursor: pointer; font-weight: 400 !important;
    font-size: 13px; color: var(--wcwp-text); line-height: 1.5;
}
.wcwp-terms-label input[type=checkbox] { width: 17px; height: 17px; min-width: 17px; margin-top: 2px; cursor: pointer; accent-color: var(--wcwp-primary); }
.wcwp-terms-label a { color: var(--wcwp-primary); text-decoration: underline; font-weight: 600; }
.wcwp-terms-wrap.wcwp-terms-error .wcwp-terms-label { color: #ef4444; }
.wcwp-terms-wrap.wcwp-terms-error input[type=checkbox] { outline: 2px solid #ef4444; border-radius: 3px; }

.wcwp-gdpr { font-size: 11px; color: #94a3b8; margin: 6px 0 0; line-height: 1.5; }
.wcwp-gdpr a { color: var(--wcwp-muted); text-decoration: underline; }

/* ── Error ───────────────────────────────────────────────────────────────── */
.wcwp-error {
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px;
    padding: 10px 14px; color: #b91c1c; font-size: 13px; margin-top: 10px;
}

/* ── Step 2: Confirm ─────────────────────────────────────────────────────── */
.wcwp-confirm-box { font-size: 14px; }
.wcwp-confirm-intro { color: var(--wcwp-muted); font-size: 13px; margin-bottom: 16px; }
.wcwp-confirm-summary table { width: 100%; border-collapse: collapse; }
.wcwp-confirm-summary th,
.wcwp-confirm-summary td { padding: 8px 12px; border: 1px solid var(--wcwp-border); font-size: 13px; text-align: left; }
.wcwp-confirm-summary th { background: var(--wcwp-bg); font-weight: 600; width: 38%; }
.wcwp-confirm-notice {
    display: flex; align-items: center; gap: 8px;
    background: #eff6ff; border-left: 4px solid #3b82f6;
    border-radius: 0 6px 6px 0; padding: 10px 14px;
    font-size: 13px; color: #1e40af; margin-top: 16px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.wcwp-modal__footer {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px; padding: 14px 24px;
    border-top: 1px solid var(--wcwp-border); background: var(--wcwp-bg);
    flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.wcwp-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: 6px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    border: 2px solid transparent; line-height: 1.3;
    transition: all .15s; text-decoration: none;
}
.wcwp-btn span { pointer-events: none; }
.wcwp-btn--ghost { background: transparent; color: var(--wcwp-muted); border-color: var(--wcwp-border); }
.wcwp-btn--ghost:hover { background: #f1f5f9; color: var(--wcwp-text); }
.wcwp-btn--secondary { background: #f1f5f9; color: var(--wcwp-text); border-color: var(--wcwp-border); }
.wcwp-btn--secondary:hover { background: #e2e8f0; }
.wcwp-btn--primary { background: var(--wcwp-primary); color: #fff; border-color: var(--wcwp-primary); }
.wcwp-btn--primary:hover { background: #16213e; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,26,46,.3); }
.wcwp-btn--confirm { background: var(--wcwp-accent); color: #fff; border-color: var(--wcwp-accent); }
.wcwp-btn--confirm:hover { background: #c73652; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(233,69,96,.35); }
.wcwp-btn--confirm:disabled,
.wcwp-btn--primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Success ─────────────────────────────────────────────────────────────── */
.wcwp-success-box {
    background: #fff; border-radius: 12px; padding: 40px 36px;
    text-align: center; max-width: 440px; width: 100%;
    box-shadow: var(--wcwp-shadow); animation: wcwp-up .2s ease;
}
.wcwp-success-icon {
    width: 64px; height: 64px; background: var(--wcwp-success);
    border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; color: #fff; margin: 0 auto 20px;
}
.wcwp-success-box h3 { font-size: 20px; font-weight: 700; color: var(--wcwp-text); margin: 0 0 10px; }
.wcwp-success-box p { color: #475569; font-size: 14px; margin: 0 0 10px; }
.wcwp-success-details {
    background: var(--wcwp-bg); border-radius: 8px;
    padding: 14px; margin: 14px 0; text-align: left; font-size: 13px;
}
.wcwp-success-details strong { color: var(--wcwp-primary); }
.wcwp-success-note { font-size: 12px !important; color: #94a3b8 !important; }

/* ── View order button ───────────────────────────────────────────────────── */
.wcwp-view-order-action {
    margin-top: 20px; padding-top: 20px;
    border-top: 1px solid var(--wcwp-border);
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.wcwp-days-left {
    font-size: 13px; color: var(--wcwp-muted);
    display: flex; align-items: center; gap: 5px;
}
.wcwp-days-left strong { color: var(--wcwp-text); }
.wcwp-trigger-btn {
    background: var(--wcwp-primary) !important;
    color: #fff !important;
    border-color: var(--wcwp-primary) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 9px 18px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: background .15s, transform .12s !important;
}
.wcwp-trigger-btn:hover {
    background: #16213e !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* ── Request status notice ───────────────────────────────────────────────── */
.wcwp-request-status-notice {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: var(--wcwp-bg);
    border-radius: 6px; border: 1px solid var(--wcwp-border);
    font-size: 13px; margin-top: 16px;
}
.wcwp-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Guest forms ─────────────────────────────────────────────────────────── */
.wcwp-guest-form-card {
    background: #fff; border: 1px solid var(--wcwp-border);
    border-radius: 10px; padding: 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,.07); margin: 20px 0;
}
.wcwp-days-left-notice {
    background: #fffbeb; border-left: 4px solid #f59e0b;
    border-radius: 0 6px 6px 0; padding: 10px 14px;
    font-size: 13px; color: #78350f; margin-bottom: 16px;
}
.wcwp-guest-items { border: 1px solid var(--wcwp-border); border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.wcwp-success-inline {
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 6px; padding: 14px 18px;
    color: #166534; font-size: 14px; margin-top: 12px;
}
.wcwp-guest-lookup-form { max-width: 480px; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .wcwp-modal { margin: 0; border-radius: 16px 16px 0 0; max-height: 94vh; position: fixed; bottom: 0; left: 0; right: 0; width: 100%; }
    .wcwp-overlay { align-items: flex-end; padding: 0; }
    .wcwp-modal__row { flex-direction: column; gap: 0; }
    .wcwp-modal__footer { flex-direction: column-reverse; gap: 8px; }
    .wcwp-btn--confirm, .wcwp-btn--primary, .wcwp-btn--ghost { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .wcwp-modal, .wcwp-success-box, .wcwp-overlay { animation: none; } }
