/* ==========================================================================
   Anti-Dumping Lookup & Comparison Table Styling
   ========================================================================== */

.anti-dumping-container {
    max-width: 1300px;
    margin: 30px auto;
    font-family: inherit;
}

/* Filter Card */
.anti-dumping-filter-card {
    background: #fbf6fb;
    border: 1px solid #ebd3eb;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 4px 20px rgba(166, 124, 156, 0.08);
    margin-bottom: 35px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 850px) {
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.filter-col label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4b3648;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    width: 100%;
    height: 48px;
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    border: 1.5px solid #d8b8d8;
    border-radius: 8px;
    background-color: #ffffff;
    color: #2c252b;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.select-wrapper select:focus {
    border-color: #a67c9c;
    box-shadow: 0 0 0 3px rgba(166, 124, 156, 0.2);
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #a67c9c;
    font-size: 12px;
}

.filter-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.btn-check-tax {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #a67c9c;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    padding: 12px 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(166, 124, 156, 0.3);
}

.btn-check-tax:hover {
    background-color: #8c5d81;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(166, 124, 156, 0.4);
}

.btn-reset-filter {
    background: transparent;
    color: #7a6576;
    border: 1px solid #d8b8d8;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-reset-filter:hover {
    background: #f0e2ef;
    color: #4b3648;
}

/* Spinner */
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

.btn-check-tax.loading .btn-spinner {
    display: inline-block;
}

.btn-check-tax.loading .btn-icon {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Header */
.anti-dumping-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ebd3eb;
}

.result-title h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #3b2837;
    font-weight: 700;
}

.result-subtitle {
    margin: 0;
    font-size: 14px;
    color: #6d5b6a;
}

.btn-print-table {
    background: #f7f1f7;
    border: 1px solid #d8b8d8;
    color: #5d4858;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-print-table:hover {
    background: #eadeea;
}

/* Comparison Table (Exact Match to Customer's Image) */
.anti-dumping-table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1.5px solid #222222;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.anti-dumping-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    line-height: 1.45;
    color: #111111;
}

/* Header matching the customer's Excel screenshot */
.anti-dumping-table thead tr th {
    background-color: #fff275; /* Exact yellow header from customer's screenshot */
    color: #000000;
    font-weight: 800;
    font-size: 13.5px;
    text-align: center;
    padding: 12px 10px;
    border: 1px solid #222222;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.anti-dumping-table tbody tr td {
    padding: 10px 12px;
    border: 1px solid #333333;
    vertical-align: middle;
}

.anti-dumping-table tbody tr:hover td {
    background-color: rgba(251, 246, 251, 0.4);
}

/* Columns formatting (4-column clean layout) */
.col-product { width: 20%; }
.col-hs { width: 28%; }
.col-origin { width: 24%; }
.col-tax { width: 28%; }

.cell-product {
    text-align: center;
    background-color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.cell-hs {
    text-align: center;
    font-family: Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
    background-color: #ffffff;
    white-space: pre-line;
    color: #222222;
}

.cell-origin {
    text-align: center;
    font-weight: 700;
    font-size: 13.5px;
    background-color: #ffffff;
    color: #111111;
}

/* RED AD TAX text as highlighted in customer's screenshot */
.cell-tax {
    text-align: center;
    font-weight: 700;
    font-size: 15.5px;
    color: #d92525 !important; /* Bold Red */
}

.cell-tax .tax-value {
    color: #d92525;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.35;
}

.tax-extra-info {
    margin-top: 5px;
    color: #555555;
    font-size: 12px;
    font-weight: 500;
}

.mill-count-note {
    margin-top: 4px;
    color: #666666;
    font-size: 11.5px;
}

.cell-tax .subsidy-badge {
    margin-top: 4px;
    font-size: 11.5px;
    color: #7b1fa2;
    font-weight: 600;
}

.cell-details {
    font-size: 12px;
    text-align: center;
}

.validity-badge {
    color: #555555;
    margin-bottom: 6px;
    line-height: 1.3;
}

.btn-source-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2ff;
    color: #3b5998 !important;
    border: 1px solid #c7d2fe;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 11.5px;
    transition: all 0.2s;
}

.btn-source-link:hover {
    background: #3b5998;
    color: #ffffff !important;
    border-color: #3b5998;
}

/* No Results Card */
.anti-dumping-no-results {
    background: #fff9e6;
    border: 1.5px solid #ffe58f;
    border-radius: 10px;
    padding: 40px 25px;
    text-align: center;
    margin-top: 25px;
}

.no-results-icon span {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #d48806;
}

.anti-dumping-no-results h4 {
    margin: 15px 0 10px;
    font-size: 18px;
    color: #873800;
}

.anti-dumping-no-results p {
    color: #614700;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.anti-dumping-no-results a {
    color: #a67c9c;
    font-weight: 600;
    text-decoration: underline;
}

/* Print styles */
@media print {
    body * {
        visibility: hidden;
    }
    .anti-dumping-table-responsive,
    .anti-dumping-table-responsive * {
        visibility: visible;
    }
    .anti-dumping-table-responsive {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
    }
}
