﻿/* â”€â”€ Exchange section on order detail page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ims-return-section {
    margin: 30px 0 10px;
    padding: 16px 20px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}
.ims-return-section h2 {
    margin: 0 0 6px;
    font-size: 1.1em;
}
.ims-notice-pending {
    margin: 0;
    padding: 10px 14px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
}

/* â”€â”€ Modal overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ims-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 16px;
    overflow-y: auto;
}
.ims-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 28px 32px;
    max-width: 540px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,.22);
}
.ims-modal-wide {
    max-width: 820px;
}
.ims-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}
.ims-modal-close:hover { color: #333; }
/* -- Exchange policy note ------------------------------------------ */
.ims-exchange-policy-note {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #f9a825;
    border-radius: 0 4px 4px 0;
    padding: 10px 14px;
    font-size: 13px;
    color: #5d4037;
    line-height: 1.5;
    margin: 0 0 16px;
}


/* â”€â”€ Step label â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ims-step-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* â”€â”€ Items list â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ims-items-list {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}
.ims-item-row {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.ims-item-row:last-child { border-bottom: none; }
.ims-item-row:hover { background: #fafafa; }

.ims-item-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: .95em;
}
.ims-item-check-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.ims-item-name small {
    color: #666;
}

/* â”€â”€ Per-item exchange options â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ims-item-exchange-options {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f5f8ff;
    border-radius: 5px;
    font-size: .9em;
}
.ims-variation-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ims-variation-select-wrap label {
    font-weight: 600;
    white-space: nowrap;
}
.ims-new-variation {
    flex: 1;
    min-width: 180px;
}

.ims-stock-badge {
    font-size: .8em;
    padding: 2px 7px;
    border-radius: 20px;
}
.badge-out {
    background: #fdecea;
    color: #c0392b;
}
.badge-low {
    background: #fff3e0;
    color: #e65100;
}

.ims-price-diff-row {
    margin-top: 6px;
    font-size: .88em;
    color: #555;
}

.ims-reason-wrap {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ims-reason-wrap label { font-weight: 600; }
.ims-reason-wrap select { flex: 1; }

/* â”€â”€ Notes field â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ims-notes-wrap { margin-top: 14px; }
.ims-notes-wrap label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}
.ims-notes-wrap textarea { width: 100%; }

/* â”€â”€ Summary panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#ims-exchange-summary {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f0f8f0;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
}
#ims-exchange-summary h3 {
    margin: 0 0 10px;
    font-size: 1em;
    color: #155724;
}
.ims-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9em;
}
.ims-summary-table td {
    padding: 3px 6px;
}
.ims-summary-table tfoot td {
    border-top: 1px solid #c3e6cb;
    padding-top: 6px;
}
.ims-summary-total-row td { font-size: 1.05em; }

.ims-delivery-notice {
    font-size: .82em;
    color: #555;
    margin: 8px 0 0;
}

.ims-payment-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: .88em;
    color: #856404;
    margin: 8px 0 0;
}

.ims-diff-pos   { color: #c0392b; font-weight: 600; }
.ims-diff-zero  { color: #888; }

/* ── Form actions ─────────────────────────────────────────────────────────── */
.form-actions {
    margin-top: 18px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: center;
}

/* Submit + Cancel buttons — explicit styles so theme doesn't break them */
.form-actions button,
.form-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    border: 2px solid transparent;
    white-space: nowrap;
}

/* Primary — Submit Exchange Request */
#ims-submit-exchange {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    top: 12px;
}
#ims-submit-exchange:hover:not(:disabled) {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}
#ims-submit-exchange:disabled {
    background: #a7c4dd;
    border-color: #a7c4dd;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Secondary — Cancel */
.form-actions .ims-modal-close {
    background: #fff;
    border-color: #8c8f94;
    color: #3c434a;
}
.form-actions .ims-modal-close:hover {
    background: #f6f7f7;
    border-color: #646970;
    color: #1d2327;
}

/* â”€â”€ Result messages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#ims-return-message {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 5px;
}
.ims-msg-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}
.ims-msg-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #721c24;
}


@media (max-width: 600px) {
    .ims-modal-content { padding: 20px 16px; }
    .ims-variation-select-wrap { flex-direction: column; align-items: flex-start; }
    .form-actions { flex-direction: column; }
}

/* ── Pay Now button in exchange pending section ───────────────────────────── */
a.ims-pay-now-btn,
a.ims-pay-now-btn:visited {
    display: inline-block;
    margin-top: 10px;
    padding: 9px 20px;
    background: #2ecc71;
    border: 1px solid #27ae60;
    border-radius: 4px;
    color: #fff !important;
    font-size: .9em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.4;
}
a.ims-pay-now-btn:hover {
    background: #27ae60;
    border-color: #219a52;
    color: #fff !important;
    text-decoration: none;
}

/* ── WooCommerce My Account order-actions Pay / Cancel buttons ────────────── */
.woocommerce-orders-table__cell-order-actions a.button,
.woocommerce-MyAccount-orders .order-actions a.button {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.5;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #333 !important;
}
.woocommerce-orders-table__cell-order-actions a.button.pay,
.woocommerce-MyAccount-orders .order-actions a.button.pay {
    background: #2ecc71;
    border-color: #27ae60;
    color: #fff !important;
}
.woocommerce-orders-table__cell-order-actions a.button.pay:hover,
.woocommerce-MyAccount-orders .order-actions a.button.pay:hover {
    background: #27ae60;
    border-color: #219a52;
    color: #fff !important;
    text-decoration: none;
}
.woocommerce-orders-table__cell-order-actions a.button.cancel,
.woocommerce-MyAccount-orders .order-actions a.button.cancel {
    background: #fff;
    border-color: #e2401c;
    color: #e2401c !important;
}
.woocommerce-orders-table__cell-order-actions a.button.cancel:hover,
.woocommerce-MyAccount-orders .order-actions a.button.cancel:hover {
    background: #e2401c;
    color: #fff !important;
    text-decoration: none;
}