/* ========================================
   Easy Withdrawal Form — Frontend Styles
   ======================================== */

.ewf-form-container { max-width:700px; margin:0 auto; }
.ewf-form-container h2 { margin-bottom:8px; font-size:1.4em; }
.ewf-form-container h3 { margin-top:24px; margin-bottom:12px; font-size:1.1em; }

/* Fields */
.ewf-field { margin-bottom:16px; }
.ewf-field label { display:block; font-weight:600; margin-bottom:4px; font-size:14px; }
.ewf-field input[type="text"],
.ewf-field input[type="email"],
.ewf-field input[type="number"],
.ewf-field textarea { width:100%; padding:8px 12px; border:1px solid #ccc; border-radius:4px; font-size:14px; box-sizing:border-box; }
.ewf-field input[readonly] { background:#f5f5f5; color:#666; cursor:not-allowed; }
.ewf-field textarea { resize:vertical; }
.ewf-field .required { color:#a00; }

/* Products table */
.ewf-products-table { width:100%; border-collapse:collapse; margin:16px 0; font-size:14px; }
.ewf-products-table th,
.ewf-products-table td { padding:10px 12px; border:1px solid #ddd; text-align:left; vertical-align:middle; }
.ewf-products-table thead th { background:#f8f8f8; font-weight:600; font-size:13px; }
.ewf-products-table .ewf-col-check { width:40px; text-align:center; }
.ewf-products-table input[type="checkbox"] { width:18px; height:18px; cursor:pointer; }
.ewf-products-table input[type="number"] { padding:4px 8px; border:1px solid #ccc; border-radius:4px; text-align:center; }
.ewf-products-table input[type="number"]:disabled { background:#f5f5f5; color:#999; }

/* Buttons */
.ewf-button-primary { display:inline-block; padding:12px 24px !important; background:#2271b1 !important; color:#fff !important; border:none !important; border-radius:4px !important; font-size:15px !important; font-weight:600 !important; cursor:pointer; transition:background .2s; line-height:1.4 !important; }
.ewf-button-primary:hover { background:#135e96 !important; color:#fff !important; }
.ewf-button-secondary { display:inline-block; padding:10px 20px !important; background:#f0f0f0 !important; color:#333 !important; border:1px solid #ccc !important; border-radius:4px !important; font-size:14px !important; cursor:pointer; transition:background .2s; margin-right:8px; }
.ewf-button-secondary:hover { background:#e0e0e0 !important; }
.ewf-button-confirm { display:inline-block; padding:14px 28px !important; background:#2e7d32 !important; color:#fff !important; border:none !important; border-radius:4px !important; font-size:16px !important; font-weight:700 !important; cursor:pointer; transition:background .2s; }
.ewf-button-confirm:hover { background:#1b5e20 !important; color:#fff !important; }

/* Order action buttons */
.woocommerce-orders-table__cell-order-actions .ewf_withdraw a,
a.ewf-button-withdraw { background:#2271b1; color:#fff; padding:8px 14px; border-radius:4px; text-decoration:none; font-size:13px; font-weight:600; display:inline-block; }
.woocommerce-orders-table__cell-order-actions .ewf_withdraw a:hover,
a.ewf-button-withdraw:hover { background:#135e96; color:#fff; }

/* Disabled button with tooltip from data attribute */
.woocommerce-orders-table__cell-order-actions .ewf_withdraw_disabled a,
.ewf-button-disabled { background:#ccc !important; color:#888 !important; cursor:not-allowed !important; padding:8px 14px; border-radius:4px; text-decoration:none; font-size:13px; display:inline-block; position:relative; }
.ewf-button-disabled:hover::after { content:attr(data-tooltip); position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%); background:#333; color:#fff; padding:8px 12px; border-radius:4px; font-size:12px; font-weight:400; white-space:nowrap; z-index:100; pointer-events:none; }
.woocommerce-orders-table__cell-order-actions .ewf_withdraw_disabled a { pointer-events:none; }

/* Status in order actions */
.woocommerce-orders-table__cell-order-actions .ewf_status a { background:#f0f0f0; color:#333; padding:6px 12px; border-radius:4px; text-decoration:none; font-size:12px; cursor:default; pointer-events:none; }

/* Notices */
.ewf-notice { padding:12px 16px; background:#e8f4fd; border-left:4px solid #2271b1; margin:16px 0; border-radius:0 4px 4px 0; }
.ewf-notice-error { background:#fde8e8; border-left-color:#a00; }
.ewf-notice-success { background:#e8fde8; border-left-color:#2e7d32; }
.ewf-error { color:#a00; padding:8px 0; font-size:14px; }
.ewf-deadline { color:#666; font-size:14px; margin-bottom:20px; }

/* Summary */
.ewf-summary-box { background:#f9f9f9; border:1px solid #ddd; border-radius:4px; padding:20px; margin:16px 0; }
.ewf-summary-box h3 { margin-top:0; }
.ewf-summary-row { display:flex; padding:8px 0; border-bottom:1px solid #eee; font-size:14px; }
.ewf-summary-row:last-child { border-bottom:none; }
.ewf-summary-label { font-weight:600; width:180px; flex-shrink:0; }
.ewf-summary-value { color:#333; }
.ewf-summary-products { width:100%; border-collapse:collapse; margin:12px 0; }
.ewf-summary-products th, .ewf-summary-products td { padding:8px; border:1px solid #ddd; text-align:left; font-size:14px; }
.ewf-summary-products thead th { background:#f0f0f0; }
.ewf-summary-products tfoot td { font-weight:700; background:#f0f0f0; }
.ewf-summary-actions { margin-top:20px; display:flex; gap:10px; align-items:center; }

/* Confirmation */
.ewf-confirmed-box { text-align:center; padding:40px 20px; }
.ewf-confirmed-box .ewf-checkmark { width:64px; height:64px; background:#2e7d32; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; margin-bottom:16px; }
.ewf-confirmed-box .ewf-checkmark svg { width:32px; height:32px; fill:none; stroke:#fff; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }

/* Spinner */
.ewf-loading { display:inline-block; width:20px; height:20px; border:2px solid #ccc; border-top-color:#2271b1; border-radius:50%; animation:ewf-spin .6s linear infinite; vertical-align:middle; margin-right:8px; }
@keyframes ewf-spin { to { transform:rotate(360deg); } }

/* Order detail */
.ewf-order-detail-button { margin:20px 0; }
.ewf-order-detail-notice { padding:12px 16px; background:#e8f4fd; border-left:4px solid #2271b1; margin:16px 0; border-radius:0 4px 4px 0; }

/* Responsive */
@media (max-width:600px) {
    .ewf-summary-row { flex-direction:column; }
    .ewf-summary-label { width:100%; margin-bottom:2px; }
    .ewf-products-table { font-size:13px; }
    .ewf-products-table th, .ewf-products-table td { padding:6px 8px; }
    .ewf-summary-actions { flex-direction:column; }
}
