
/* ==========================================================================
   URBANSTYLE WHOLESALE MATRIX ORDER CSS (CLEAN & COMPACT V1.1.0)
   ========================================================================== */

.urbanstyle-matrix-wrapper {
    margin: 15px 0 25px 0;
    padding: 16px 14px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.urbanstyle-table-responsive {
    width: 100%;
    overflow-x: hidden;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.urbanstyle-matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 !important;
    text-align: center;
    background: #ffffff;
    table-layout: auto;
}

.urbanstyle-matrix-table th,
.urbanstyle-matrix-table td {
    padding: 8px 6px;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

.urbanstyle-matrix-table thead th {
    background: #f8fafc;
    font-weight: 800;
    font-size: 11px;
    color: #334155;
    letter-spacing: 0.3px;
    padding: 10px 6px;
}

.header-split-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.header-split-title .row-tag {
    color: #0f172a;
}

.header-split-title .col-tag {
    color: #2563eb;
}

.header-split-title .divider {
    color: #cbd5e1;
}

.size-pill {
    display: inline-block;
    padding: 3px 8px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 14px;
    font-weight: 800;
    font-size: 11px;
    min-width: 24px;
}

.color-indicator-box {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #1e293b;
    font-size: 12px;
    text-align: left;
    white-space: nowrap;
}

.color-swatch-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    display: inline-block;
    flex-shrink: 0;
}

.generic-swatch {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
}

/* DIRECT KEYBOARD NUMERIC INPUT */
.matrix-qty-input {
    width: 48px !important;
    height: 34px !important;
    text-align: center !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: block !important;
    transition: all 0.15s ease !important;
    cursor: text;
    -moz-appearance: textfield;
}

.matrix-qty-input::-webkit-outer-spin-button,
.matrix-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.matrix-qty-input:hover {
    border-color: #94a3b8 !important;
    background: #ffffff !important;
}

.matrix-qty-input:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
    outline: none !important;
}

.matrix-qty-input.has-qty {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 900 !important;
}

.badge-out {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    background: #f8fafc;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px dashed #cbd5e1;
    display: inline-block;
    white-space: nowrap;
}

.td-row-total, .td-col-total {
    font-weight: 800;
    color: #334155;
    font-size: 12px;
    background: #f8fafc;
    white-space: nowrap;
}

.unit-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
}

.tfoot-totals-row td {
    background: #f1f5f9;
    font-weight: 800;
    color: #0f172a;
    border-top: 2px solid #cbd5e1;
    padding: 8px 6px;
}

.td-foot-label {
    font-size: 11px;
    letter-spacing: 0.4px;
}

.grand-total-qty-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

/* SUMMARY BAR & CTA BUTTON */
.urbanstyle-matrix-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    gap: 16px;
    flex-wrap: wrap;
}

.summary-details {
    display: flex;
    align-items: center;
    gap: 20px;
}

.summary-kpi {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 2px;
}

.kpi-value {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.total-price-kpi .kpi-value {
    color: #2563eb;
    font-size: 18px;
}

.urbanstyle-btn-bulk-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 13px 24px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease !important;
}

.urbanstyle-btn-bulk-add:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.urbanstyle-btn-bulk-add:disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.urbanstyle-matrix-feedback {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.urbanstyle-matrix-feedback.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.urbanstyle-matrix-feedback.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.feedback-btn {
    padding: 5px 12px;
    background: #059669;
    color: #ffffff !important;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .urbanstyle-matrix-wrapper {
        padding: 10px;
    }
    .urbanstyle-table-responsive {
        overflow-x: auto;
    }
    .urbanstyle-matrix-summary-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .summary-details {
        justify-content: space-between;
    }
    .urbanstyle-btn-bulk-add {
        width: 100%;
        justify-content: center;
    }
}
