/* ========================================================================
   EzraOrg — Withdraw Requests Admin Page
   Modern admin styling scoped to .ezra-wd-page
   ======================================================================== */

/* ---- Page Wrapper ---- */
.ezra-wd-page {
    max-width: 1200px;
    margin: 20px 20px 40px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ---- Page Header ---- */
.ezra-wd-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0958a3 100%);
    border-radius: 12px;
    padding: 32px 36px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.ezra-wd-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}
.ezra-wd-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
.ezra-wd-header__title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    padding: 0;
    letter-spacing: -0.02em;
}
.ezra-wd-header__subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 400;
}

/* ---- Manual Withdrawal Card ---- */
.ezra-mwd-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}
.ezra-mwd-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.ezra-mwd-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    user-select: none;
}
.ezra-mwd-card__header:hover {
    background: #f8fafc;
}
.ezra-mwd-card__header .dashicons {
    color: #64748b;
    transition: transform 0.2s ease;
    font-size: 18px;
    width: 18px;
    height: 18px;
}
.ezra-mwd-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}
.ezra-mwd-card__badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f0f7ff;
    color: #0958a3;
}
.ezra-mwd-card__body {
    padding: 24px;
}
.ezra-mwd-card__desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 24px;
    padding: 12px 16px;
    background: #f8fafc;
    border-left: 3px solid #0958a3;
    border-radius: 0 6px 6px 0;
}

/* Form fields */
.ezra-mwd-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.ezra-mwd-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.ezra-mwd-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ezra-mwd-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ezra-mwd-select,
.ezra-mwd-input,
.ezra-mwd-textarea {
    width: 100% !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
}
.ezra-mwd-select:focus,
.ezra-mwd-input:focus,
.ezra-mwd-textarea:focus {
    border-color: #0958a3 !important;
    box-shadow: 0 0 0 3px rgba(9, 88, 163, 0.08) !important;
    background: #fff !important;
}
.ezra-mwd-textarea {
    min-height: 80px;
    resize: vertical;
}
.ezra-mwd-hint {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0;
    font-style: italic;
}
.ezra-mwd-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}
.ezra-mwd-actions .spinner {
    float: none !important;
    margin: 0 !important;
}
.ezra-mwd-actions #ezra-mwd-notice {
    flex: 1;
}
.ezra-mwd-submit.button.button-primary {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: #0958a3 !important;
    border-color: #0958a3 !important;
    transition: all 0.2s ease !important;
}
.ezra-mwd-submit.button.button-primary:hover {
    background: #074a8a !important;
    border-color: #074a8a !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(9, 88, 163, 0.25) !important;
}
.ezra-mwd-submit .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* ---- Table Card Wrapper ---- */
.ezra-wd-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ---- WP List Table Overrides ---- */
.ezra-wd-page .wp-list-table {
    border: none;
    border-collapse: separate;
    border-spacing: 0;
}
.ezra-wd-page .wp-list-table thead th,
.ezra-wd-page .wp-list-table thead td {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 16px;
}
.ezra-wd-page .wp-list-table tbody tr {
    transition: background 0.15s ease;
}
.ezra-wd-page .wp-list-table tbody tr:hover {
    background: #f8fafc;
}
.ezra-wd-page .wp-list-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
    vertical-align: middle;
}
.ezra-wd-page .wp-list-table tbody tr:last-child td {
    border-bottom: none;
}
.ezra-wd-page .wp-list-table #tid {
    width: 50px;
}
.ezra-wd-page .wp-list-table a {
    color: #0958a3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}
.ezra-wd-page .wp-list-table a:hover {
    color: #074a8a;
}

/* Pagination */
.ezra-wd-page .tablenav {
    padding: 12px 16px;
    margin: 0;
}

/* ---- Modern Badges ---- */
.ezra-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: default;
    line-height: 1.5;
    white-space: nowrap;
    transition: all 0.15s ease;
}
button.ezra-badge {
    cursor: pointer;
}
button.ezra-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Approve (pending → needs approval) */
.ezra-badge--pending {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
}
.ezra-badge--pending:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
}

/* Decline (already paid) */
.ezra-badge--paid {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
}
.ezra-badge--paid:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

/* Manual */
.ezra-badge--info {
    background: #dbeafe;
    color: #1e40af;
}

/* Admin recorder */
.ezra-badge--admin {
    background: #f3e8ff;
    color: #6b21a8;
}

/* Fund raised */
.ezra-badge--raised {
    background: #e0f2fe;
    color: #0369a1;
}

/* Goal */
.ezra-badge--goal {
    background: #dcfce7;
    color: #166534;
}

/* Message / Method toggle */
.ezra-badge--msg,
.ezra-badge--method {
    background: #f1f5f9;
    color: #475569;
}
.ezra-badge--msg:hover,
.ezra-badge--method:hover {
    background: #e2e8f0;
}

/* ---- Action Cell ---- */
.ezra-wd-action-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
}

/* ---- Message Popup ---- */
.ezra-msg-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    min-width: 250px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
}
.ezra-msg-popup.active {
    display: block;
}
.ezra-msg-popup p {
    margin: 4px 0;
    font-size: 13px;
}
.ezra-msg-close {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #0958a3;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ezra-msg-close:hover {
    color: #074a8a;
}

/* ---- Empty State ---- */
.ezra-wd-empty {
    text-align: center;
    padding: 60px 24px;
    color: #94a3b8;
}
.ezra-wd-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 16px;
    color: #cbd5e1;
}
.ezra-wd-empty p {
    font-size: 15px;
    margin: 0;
}

/* ---- Payment Method Radios (withdraw modals on frontend) ---- */
.ezra-wd-methods {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ezra-wd-method-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
}
.ezra-wd-method-label:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.ezra-wd-method-label input[type="radio"] {
    accent-color: #0958a3;
}
.ezra-wd-method-label:has(input:checked) {
    border-color: #0958a3;
    background: #eff6ff;
    color: #0958a3;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
    .ezra-mwd-field-row {
        grid-template-columns: 1fr;
    }
    .ezra-wd-header {
        padding: 24px;
    }
    .ezra-wd-header__title {
        font-size: 20px;
    }
}
