.table-container {
    max-width: 1100px;
    margin-top: clamp(1.875rem, 0.5625rem + 7vw, 6.25rem);
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: clamp(0.625rem, 0.55rem + 0.4vw, 0.875rem);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    /* This property ensures the table respects the container width */
    table-layout: fixed;
}

.sell-cols {
    font-size: clamp(0.875rem, 0.7556rem + 0.597vw, 1.125rem);
    font-weight: 600;
}

.responsive-table thead tr {
    background-color: #b28a58;
    color: #ffffff;
    text-align: left;
    font-family: 'Playfair Display', serif;
    font-weight: bold;
}

.responsive-table th,
.responsive-table td {
    padding: 12px 15px;
    /* This allows long words to break and wrap */
    word-wrap: break-word;
}

.responsive-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.responsive-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.responsive-table tbody tr:last-of-type {
    border-bottom: 2px solid #b28a58;
}

td[data-label="Description"] {
    font-size: clamp(0.875rem, 0.7556rem + 0.597vw, 1.125rem);
    font-weight: 600;
}

.sub-cell-high {
    margin-top: 4px;
    font-size: 0.95em;
    color: #b28a58;
    font-weight: 500;
    display: block;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.sub-cell-high small {
    font-size: 0.95em;
    color: #b28a58;
    font-weight: 500;
}

.sub-cell-high span {
    font-weight: 400;
    color: #222;
}

@media (max-width: 399px) {
    .table-container {
        padding-left: 2px !important;
        padding-right: 2px !important;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        /* adjust as needed to align with screen edge */
        margin-right: 0;
    }

    .responsive-table {
        width: 100%;
        min-width: 0;
    }
}

/* Responsive adjustments for small screens */
@media (max-width: 575px) {
    .sub-cell-high {
        font-size: 0.85em;
        margin-top: 2px;
    }

    .responsive-table td {
        padding-bottom: 8px;
    }
}

/* Mobile specific adjustments */
@media screen and (max-width: 768px) {
    .responsive-table {
        font-weight: 100;
        /* Adjust font size for better readability on mobile */
    }

    .responsive-table th,
    .responsive-table td {
        padding: 10px 5px;
        /* Reduce padding to give content more space */
    }
}

/* Price movement color indicators */
.up-color {
    background-color: rgba(16, 185, 129, 0.08);
    /* soft green bg */
    color: #059669;
    /* emerald green text */
    transition: background-color 250ms ease, color 250ms ease;
}

.down-color {
    background-color: rgba(239, 68, 68, 0.08);
    /* soft red bg */
    color: #dc2626;
    /* red text */
    transition: background-color 250ms ease, color 250ms ease;
}

/* Optional: make the small high-value span darker while preserving movement color */
.up-color .sub-cell-high span,
.down-color .sub-cell-high span {
    color: inherit;
}

/* Animate mobile menu open/close: use max-height + opacity for smooth transition */
#mobile-menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 320ms ease, opacity 320ms ease, transform 320ms ease;
}

#mobile-menu.open {
    max-height: 600px;
    /* large enough to show menu items; adjust if you add more links */
    opacity: 1;
    transform: translateY(0);
}