/* ==============================================================================
   AOURA OPERATIONS — LISTING CONTENT SUB-TAB STYLES
   ============================================================================== */

/* Container and Panel */
.listing-content-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Toolbar */
.listing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #ffffff;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.listing-toolbar-left,
.listing-toolbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.listing-search-input {
    min-width: 260px;
    padding: 8px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1E293B;
    background: #F8FAFC;
    outline: none;
    transition: all 0.2s ease;
}

.listing-search-input:focus {
    border-color: #2563EB;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.listing-select-filter {
    padding: 8px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #334155;
    background: #FFFFFF;
    outline: none;
    cursor: pointer;
}

.listing-select-filter:focus {
    border-color: #2563EB;
}

/* Pull Button & GST Timestamp */
.listing-btn-pull {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.listing-btn-pull:hover {
    background: #DBEAFE;
    color: #1E40AF;
}

.listing-btn-pull:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.listing-last-pull-label {
    font-size: 0.78rem;
    color: #64748B;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Selection & Action Bar */
.listing-selection-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #F8FAFC;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
}

.listing-selection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
}

.listing-pill-count {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #E2E8F0;
    color: #0F172A;
    font-size: 0.76rem;
    font-weight: 700;
}

.listing-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-listing-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.btn-listing-export {
    background: #FFFFFF;
    color: #334155;
    border: 1px solid #CBD5E1;
}

.btn-listing-export:hover:not(:disabled) {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #94A3B8;
}

.btn-listing-upload {
    background: #2563EB;
    color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(37,99,235,0.2);
}

.btn-listing-upload:hover {
    background: #1D4ED8;
}

.btn-listing-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Listings Table Wrap */
.listing-table-wrap {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.listing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    text-align: left;
}

.listing-table th {
    background: #F8FAFC;
    color: #475569;
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 12px 14px;
    border-bottom: 1px solid #E2E8F0;
    white-space: nowrap;
}

.listing-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #F1F5F9;
    color: #1E293B;
    vertical-align: middle;
}

.listing-table tr.listing-row:hover {
    background: #F8FAFC;
    cursor: pointer;
}

.listing-table tr.listing-row.selected {
    background: #EFF6FF;
}

/* Product Info Cell */
.listing-product-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 320px;
}

.listing-sku-tag {
    font-family: monospace;
    font-weight: 700;
    color: #0F172A;
    font-size: 0.85rem;
}

.listing-asin-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2563EB;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
}

.listing-asin-link:hover {
    text-decoration: underline;
}

.listing-title-truncated {
    color: #64748B;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Pills & Badges */
.limit-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: monospace;
}

.limit-pill-healthy {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.limit-pill-warning {
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.limit-pill-over {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
    font-weight: 700;
}

.indicator-icon {
    font-weight: 700;
    font-size: 0.95rem;
}

.indicator-check {
    color: #059669;
}

.indicator-cross {
    color: #DC2626;
}

/* Status Badges */
.status-pill-lg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill-ready {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.status-pill-missing {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FCD34D;
}

.status-pill-issues {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.status-pill-notpulled {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

/* Right Detail Drawer */
.listing-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.listing-drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.listing-drawer {
    position: fixed;
    top: 0;
    right: -540px;
    width: 520px;
    max-width: 90vw;
    height: 100%;
    background: #FFFFFF;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transition: right 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.listing-drawer.open {
    right: 0;
}

.listing-drawer-header {
    padding: 18px 24px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F8FAFC;
}

.listing-drawer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 8px;
}

.listing-drawer-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #64748B;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.listing-drawer-close:hover {
    color: #0F172A;
}

.listing-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drawer-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.drawer-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-field-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748B;
}

.drawer-field-value-ro {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.84rem;
    color: #1E293B;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

/* History Timeline */
.listing-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.listing-history-item {
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 12px;
    background: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.listing-history-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.listing-history-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0F172A;
}

.listing-history-user {
    font-size: 0.74rem;
    color: #64748B;
}

.btn-restore-version {
    padding: 5px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #B45309;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-restore-version:hover {
    background: #FEF3C7;
    color: #92400E;
}

.listing-drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid #E2E8F0;
    background: #F8FAFC;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Diff Preview Modal */
.listing-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.listing-modal-backdrop.open {
    display: flex;
}

.listing-diff-modal {
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 980px;
    max-height: 90vh;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.listing-diff-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F8FAFC;
}

.listing-diff-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Diff Table */
.diff-table-wrap {
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
}

.diff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

.diff-table th {
    background: #F8FAFC;
    padding: 10px 14px;
    font-weight: 700;
    color: #475569;
    font-size: 0.74rem;
    text-transform: uppercase;
    border-bottom: 1px solid #E2E8F0;
}

.diff-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #F1F5F9;
    vertical-align: top;
}

.diff-field-name {
    font-weight: 700;
    color: #334155;
    font-family: monospace;
}

.diff-val-old {
    background: #FEF2F2;
    color: #991B1B;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #FECACA;
    font-size: 0.8rem;
    word-break: break-word;
}

.diff-val-new {
    background: #ECFDF5;
    color: #065F46;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #A7F3D0;
    font-size: 0.8rem;
    word-break: break-word;
}

/* Alert Boxes in Diff Modal */
.listing-alert-box {
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.84rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alert-box-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
}

.alert-box-conflict {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.alert-box-issues {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
}

/* Affirmation Checkbox Box */
.affirmation-container {
    background: #FFFBEB;
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.affirmation-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #D97706;
}

.affirmation-label {
    font-weight: 700;
    color: #92400E;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
}

/* Diff Footer */
.listing-diff-footer {
    padding: 16px 24px;
    border-top: 1px solid #E2E8F0;
    background: #F8FAFC;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-push-amazon-live {
    background: #059669;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(5,150,105,0.25);
}

.btn-push-amazon-live:hover:not(:disabled) {
    background: #047857;
}

.btn-push-amazon-live:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #94A3B8;
    box-shadow: none;
}

/* Error Report Export Button */
.btn-export-errors {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-export-errors:hover {
    background: #FEE2E2;
}
