/* === PayMaxis Orders Table Custom Styles === */

/* Entire Table */
/*#paymaxis-orders-table {*/
/*    border-collapse: collapse;*/
/*    width: 100%;*/
/*  border: 1px solid #d1d5db;  /* Light gray border */
/*    border-radius: 6px;*/
/*    overflow: hidden;*/
/*    font-family: system-ui, sans-serif;*/
/*}*/

/* Entire Table */
#paymaxis-orders-table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #d1d5db;
    /* Ensures outer border */
    font-family: system-ui, sans-serif;
    font-size: 12px;
    color: black;
    box-shadow: 0 0 0 0.5px #d1d5db;
    /* Optional: soft outer border */
}

/* Table Header */
#paymaxis-orders-table thead th {
    background-color: #009688a1;
    /* Tailwind slate-700 */
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    border: 1px solid #d1d5db;
    padding: 10px;
}

/* Table Row Zebra Striping */
#paymaxis-orders-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
    /* light gray (Tailwind gray-50) */
}

#paymaxis-orders-table tbody tr:nth-child(even) {
    background-color: #ffffff;
    /* slightly darker gray */
}

/* Hover effect */
#paymaxis-orders-table tbody tr:hover {
    background-color: #e0f2fe;
    /* light blue */
}

/* Table Cell Borders + Padding */
#paymaxis-orders-table td,
#paymaxis-orders-table th {
    padding: 12px 10px;
    border: 1px solid #d1d5db;
    vertical-align: middle;
}

/* Row numbers column */
#paymaxis-orders-table td:first-child,
#paymaxis-orders-table th:first-child {
    text-align: center;
    width: 50px;
}

/* === PayMaxis Status Buttons === */
.paymaxis-status {
    display: inline-block;
    padding: 6px 12px;
    min-width: 100px;
    text-align: center;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ✅ Completed: Green */
.status-completed {
    background-color: #28a745;
    color: #ffffff;
}

/* ❌ Declined: Dark Red */
.status-declined {
    background-color: #dc3545;
    color: #ffffff;
}

/* ⚠️ Cancelled: Softer Red */
.status-cancelled {
    background-color: #f87171;
    color: #ffffff;
}

.status-refunded {
    background-color: #F44336;
    color: white;
}


/* ⛔ Other: Light red tint */
.status-other {
    background-color: #fcdcdc;
    color: #b91c1c;
}


/* In your paymaxis-table.css */
.status-chargeback {
    background-color: #9C27B0;
    /* Purple */
    color: white;
    font-weight: bold;
}

.status-refunded {
    background-color: #F44336;
    /* Red */
    color: white;
}

/* === Dark Theme Enhancements for Paymaxis Orders Page === */

/* Dark cards for filters, export, and email toggle */
.paymaxis-filters-card,
.paymaxis-export-card,
.paymaxis-email-toggle-card {
    background-color: #111827;
    border: 1px solid #1f2937;
    border-radius: 8px;
    padding: 16px 18px;
    color: #e5e7eb;
    margin: 18px 0;
}

.paymaxis-filters-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #f9fafb;
}

.paymaxis-filters-card label {
    font-size: 12px;
    color: #d1d5db;
}

.paymaxis-filters-card input[type="date"],
.paymaxis-filters-card input[type="text"],
.paymaxis-filters-card select {
    background-color: #030712;
    border: 1px solid #374151;
    color: #f9fafb;
    border-radius: 4px;
    padding: 6px 8px;
    min-width: 160px;
}

.paymaxis-filters-card input[type="date"]::placeholder,
.paymaxis-filters-card input[type="text"]::placeholder {
    color: #9ca3af;
}

.paymaxis-filters-card input[type="date"]:focus,
.paymaxis-filters-card input[type="text"]:focus,
.paymaxis-filters-card select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.paymaxis-filters-card .button.button-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;

    font-size: 13px;
    font-weight: 500;
}

.paymaxis-filters-card .button.button-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.paymaxis-export-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.paymaxis-export-card-title {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.paymaxis-export-card .button {
    background-color: #111827;
    border-color: #4b5563;
    color: #e5e7eb;
    padding: 6px 14px;
    font-size: 13px;
}

.paymaxis-export-card .button:hover {
    background-color: #1f2937;
    border-color: #6b7280;
}

.paymaxis-email-toggle-card label {
    color: #e5e7eb;
}

.paymaxis-email-toggle-card p {
    color: #9ca3af;
}

/* Dark table styling to match page */
#paymaxis-orders-table {
    border: 1px solid #1f2937;
    color: #e5e7eb;
    background-color: #020617;
}

#paymaxis-orders-table thead th {
    background-color: #111827;
    border-color: #1f2937;
}

#paymaxis-orders-table tbody tr:nth-child(odd),
#paymaxis-orders-table tbody tr:nth-child(even) {
    background-color: #020617;
}

#paymaxis-orders-table tbody tr:hover {
    background-color: #0f172a;
}

#paymaxis-orders-table td,
#paymaxis-orders-table th {
    border-color: #1f2937;
}


select:not([size]) {

    background: transparent !important;
    border: solid 1px #3b3b3b !important;
}


input[type="date"],
.paymaxis-filters-card input[type="text"] {

    background: transparent !important;
    border: solid 1px #3b3b3b !important;
}

.woocommerce-js input[type=search] {
    background-color: transparent !important;
}


.paymaxis-var-value {

    background: #030712 !important;

}

/* === Orders page layout containment (no redesign) === */
.paymaxis-orders-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding: 0 12px 24px;
    position: relative;
}

.paymaxis-orders-page *,
.paymaxis-orders-page *::before,
.paymaxis-orders-page *::after {
    box-sizing: border-box;
}

.paymaxis-orders-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.4;
}

.paymaxis-orders-hint-warn {
    color: #fbbf24;
}

.paymaxis-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 15px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.paymaxis-filters-row:last-child {
    margin-bottom: 0;
}

.paymaxis-filter-field {
    flex: 1 1 160px;
    min-width: 140px;
    max-width: 100%;
}

.paymaxis-filter-field-grow {
    flex: 2 1 220px;
}

.paymaxis-filter-field label {
    display: block;
    margin-bottom: 4px;
}

.paymaxis-filter-field input,
.paymaxis-filter-field select {
    width: 100%;
    min-width: 0;
}

.paymaxis-filter-actions {
    flex: 0 1 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.paymaxis-filter-actions-label {
    visibility: hidden;
}

.paymaxis-filter-actions .button {
    width: 100%;
}

.paymaxis-show-all-dates {
    font-size: 12px;
    color: #93c5fd;
    text-decoration: underline;
}

.paymaxis-show-all-dates:hover {
    color: #bfdbfe;
}

/* Table shell — prefer fitting width (no forced horizontal scroll) */
.paymaxis-orders-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 0 24px;
    padding: 12px;
    overflow-x: hidden;
    background-color: #020617;
    border: 1px solid #1f2937;
    border-radius: 8px;
    position: relative;
}

.paymaxis-orders-wrapper .dataTables_wrapper {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.paymaxis-orders-wrapper .dataTables_length,
.paymaxis-orders-wrapper .dataTables_filter {
    margin-bottom: 10px;
}

.paymaxis-orders-wrapper .dataTables_length label,
.paymaxis-orders-wrapper .dataTables_filter label {
    color: #d1d5db;
}

.paymaxis-orders-wrapper .dataTables_filter input {
    background: #030712 !important;
    border: 1px solid #3b3b3b !important;
    color: #e5e7eb !important;
    border-radius: 4px;
    padding: 4px 8px;
    margin-left: 6px;
}

.paymaxis-orders-wrapper .dataTables_info,
.paymaxis-orders-wrapper .dataTables_paginate {
    color: #9ca3af;
    padding-top: 10px;
}

.paymaxis-orders-wrapper .dataTables_paginate .paginate_button {
    color: #e5e7eb !important;
}

.paymaxis-orders-wrapper .dataTables_paginate .paginate_button.current {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #f9fafb !important;
}

#paymaxis-orders-table {
    width: 100% !important;
    table-layout: fixed;
    font-size: 11px;
}

#paymaxis-orders-table thead th {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 6px 4px !important;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    vertical-align: bottom;
}

#paymaxis-orders-table tbody td {
    padding: 6px 4px !important;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

#paymaxis-orders-table .pmx-col-name {
    width: 9%;
    max-width: 120px;
}

#paymaxis-orders-table .pmx-col-geo {
    width: 42px;
    max-width: 42px;
    text-align: center;
}

#paymaxis-orders-table .pmx-col-woo {
    width: 52px;
    max-width: 56px;
}

#paymaxis-orders-table .pmx-col-parent {
    width: 48px;
    max-width: 52px;
}

#paymaxis-orders-table .pmx-col-ref {
    width: 64px;
    max-width: 72px;
}

#paymaxis-orders-table .pmx-muted {
    color: #6b7280;
}

#paymaxis-orders-table tbody td.pmx-col-email,
#paymaxis-orders-table tbody td.pmx-col-ext-full {
    white-space: normal;
    word-break: break-all;
    overflow: visible;
    text-overflow: unset;
    max-width: 160px;
}

#paymaxis-orders-table .pmx-email-full {
    display: inline;
}

.paymaxis-orders-page .paymaxis-status {
    min-width: 0;
    padding: 3px 6px;
    font-size: 10px;
}

.pmx-cell-compact {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    min-width: 0;
}

.pmx-trim {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.pmx-icon-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border: 1px solid #374151;
    border-radius: 3px;
    background: #111827;
    color: #93c5fd;
    cursor: pointer;
    line-height: 1;
}

.pmx-icon-btn:hover {
    background: #1f2937;
    color: #bfdbfe;
    border-color: #4b5563;
}

.pmx-icon-btn.is-copied {
    color: #86efac;
    border-color: #166534;
}

.pmx-code-popover {
    position: absolute;
    z-index: 50;
    display: none;
    align-items: flex-start;
    gap: 8px;
    max-width: min(420px, calc(100% - 24px));
    padding: 10px 12px;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    color: #e5e7eb;
}

.pmx-code-popover.is-open,
.pmx-code-popover[style*="display: flex"],
.pmx-code-popover[style*="display:flex"] {
    display: flex !important;
}

.pmx-code-popover-text {
    flex: 1 1 auto;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-all;
    white-space: pre-wrap;
}

.pmx-code-popover-close {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.pmx-code-popover-close:hover {
    color: #f9fafb;
}

.paymaxis-orders-page .paymaxis-dashboard-widgets {
    width: 100%;
    max-width: 100%;
}

.paymaxis-orders-page .paymaxis-filters-card,
.paymaxis-orders-page .paymaxis-export-card,
.paymaxis-orders-page .paymaxis-email-toggle-card {
    max-width: 100%;
}

@media (max-width: 782px) {
    .paymaxis-orders-page {
        padding: 0 8px 20px;
    }

    .paymaxis-filter-field,
    .paymaxis-filter-field-grow,
    .paymaxis-filter-actions {
        flex: 1 1 100%;
    }

    .paymaxis-filter-actions-label {
        display: none;
    }

    .paymaxis-orders-wrapper {
        overflow-x: auto;
    }
}