/* Upset Sales Table Styles */

.upset-sales-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    font-family: Arial, sans-serif;
}

.upset-sales-header {
    margin-bottom: 20px;
    text-align: center;
}

.upset-sales-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 2.1rem;
}

.upset-sales-disclaimer {
    font-size: 12px;
    font-weight: bold;
    font-style: italic;
    color: #333;
    margin: 0 auto 10px;
    max-width: 42%;
    line-height: 1.2rem;
}

.upset-sales-date-range {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
}

.upset-sales-print-btn {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.upset-sales-print-btn:hover {
    background-color: #005a87;
}

.upset-sales-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

.upset-sales-table thead th {
    background-color: #1a3a5c;
    color: #fff;
    padding: 10px 8px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #0d2137;
    white-space: nowrap;
}

.upset-sales-table tbody td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.upset-sales-date-row td {
    background-color: #f5f5f5;
    font-weight: bold;
    font-style: italic;
    text-align: center;
    padding: 12px 8px;
    color: #333;
}

.upset-sales-data-row:hover {
    background-color: #f9f9f9;
}

.upset-sales-data-row td:nth-child(3) {
    /* Property Address column - allow wrapping */
    max-width: 250px;
}

.upset-sales-data-row td:last-child {
    /* Bid Amount - right align */
    text-align: right;
    white-space: nowrap;
}

.upset-sales-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    font-size: 13px;
    color: #666;
    text-align: center;
}

.upset-sales-count {
    margin: 0 0 15px 0;
}

.upset-sales-load-more {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, opacity 0.2s;
}

.upset-sales-load-more:hover {
    background-color: #005a87;
}

.upset-sales-load-more:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.upset-sales-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Gate Message */
.upset-sales-gate-message {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.upset-sales-gate-message p {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 16px;
}

.upset-sales-gate-message p:last-child {
    margin-bottom: 0;
}

.upset-sales-gate-btn {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    padding: 12px 30px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.upset-sales-gate-btn:hover {
    background-color: #005a87;
    color: #fff;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    .upset-sales-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .upset-sales-disclaimer {
        max-width: 100%;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .upset-sales-print-btn,
    .upset-sales-load-more,
    .upset-sales-count,
    header,
    footer,
    nav,
    .site-header,
    .site-footer,
    .sidebar,
    #wpadminbar {
        display: none !important;
    }

    body {
        background: #fff !important;
        margin: 0;
        padding: 0;
    }

    .upset-sales-container {
        padding: 0;
        max-width: 100%;
    }

    .upset-sales-title {
        font-size: 18px;
    }

    .upset-sales-date-range {
        font-size: 12px;
    }

    .upset-sales-table {
        font-size: 10px;
        page-break-inside: auto;
    }

    .upset-sales-table thead {
        display: table-header-group;
    }

    .upset-sales-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    .upset-sales-table thead th {
        background-color: #1a3a5c !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 6px 4px;
    }

    .upset-sales-table tbody td {
        padding: 4px;
    }

    .upset-sales-date-row td {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 8px 4px;
    }

    .upset-sales-footer {
        font-size: 10px;
    }
}
