/* Set table background to white and force it to fit within mobile screens */
.rounded-rows-table,
.rounded-rows-table table {
    background-color: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: visible !important;
}

.rounded-rows-table table {
    border-collapse: separate !important;
    border-spacing: 0 6px !important;
    table-layout: fixed !important;
}

/* Default / Mobile column widths (keeps S23 layout intact) */
.rounded-rows-table th:nth-child(1),
.rounded-rows-table td:nth-child(1) {
    width: 15% !important;
}

.rounded-rows-table th:nth-child(2),
.rounded-rows-table td:nth-child(2) {
    width: 18% !important;
}

.rounded-rows-table th:nth-child(3),
.rounded-rows-table td:nth-child(3) {
    width: 21% !important;
}

.rounded-rows-table th:nth-child(4),
.rounded-rows-table td:nth-child(4) {
    width: 46% !important;
}

/* Tighter, sleeker column widths specifically for PC / Tablet screens */
@media (min-width: 601px) {
    .rounded-rows-table th:nth-child(1),
    .rounded-rows-table td:nth-child(1) {
        width: 11% !important; /* Tighter Year & Month column */
    }

    .rounded-rows-table th:nth-child(2),
    .rounded-rows-table td:nth-child(2) {
        width: 14% !important; /* Tighter Location column */
    }

    .rounded-rows-table th:nth-child(3),
    .rounded-rows-table td:nth-child(3) {
        width: 15% !important; /* Tighter Activity column */
    }

    .rounded-rows-table th:nth-child(4),
    .rounded-rows-table td:nth-child(4) {
        width: 60% !important; /* Gives long route badges plenty of room on one line */
    }
}

/* Smooth transition for the lift and shadow on rows */
.rounded-rows-table tbody tr {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 10px;
}

/* Lift and shadow effect when hovering over a row */
.rounded-rows-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

/* Style all cells and stop mid-word splitting */
.rounded-rows-table td,
.rounded-rows-table th {
    border-top: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-left: none !important;
    border-right: none !important;
    padding: 9px 6px;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    vertical-align: middle;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Allow long route names in column 4 to wrap cleanly between words */
.rounded-rows-table td:nth-child(4),
.rounded-rows-table th:nth-child(4) {
    overflow-wrap: break-word !important;
}

/* Soft warm peach-cream color for data row cards */
.rounded-rows-table td {
    background-color: #fdf6f2 !important;
}

/* Slightly deeper warm peach for the header row */
.rounded-rows-table th {
    background-color: #f4cbb6 !important;
}

/* Stronger warm highlight when hovering over a data row */
.rounded-rows-table tbody tr:hover td {
    background-color: #f8dfd2 !important;
    border-color: rgba(0, 0, 0, 0.4) !important;
}

/* Restore outer left border and round left corners */
.rounded-rows-table td:first-child,
.rounded-rows-table th:first-child {
    border-left: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    padding-left: 12px !important;
}

/* Restore outer right border and round right corners */
.rounded-rows-table td:last-child,
.rounded-rows-table th:last-child {
    border-right: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    padding-right: 12px !important;
}

/* Turn links into neat rounded badges that wrap cleanly on mobile */
.rounded-rows-table tbody td a {
    display: inline-block;
    background-color: #ffffff;
    color: #5c1d06;
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.35;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(92, 29, 6, 0.25);
    text-decoration: none;
    vertical-align: middle;
    max-width: 100%;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Invert pill badge colors when hovering over the row */
.rounded-rows-table tbody tr:hover a {
    background-color: #5c1d06;
    color: #ffffff;
    border-color: #5c1d06;
    text-decoration: none;
}

/* Extra-compact sizing specifically for mobile screens */
@media (max-width: 600px) {
    .rounded-rows-table td,
    .rounded-rows-table th {
        font-size: 11px !important;
        padding: 8px 3px !important;
    }

    .rounded-rows-table td:first-child,
    .rounded-rows-table th:first-child {
        padding-left: 8px !important;
    }

    .rounded-rows-table td:last-child,
    .rounded-rows-table th:last-child {
        padding-right: 8px !important;
    }

    .rounded-rows-table tbody td a {
        font-size: 10.5px !important;
        padding: 4px 6px !important;
    }
}
/* Scoped Table Search Bar Container */
.post-search-container {
    margin: 10px 0 14px 0;
    padding: 12px;
    background-color: #fdf6f2;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
}

.post-search-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Search Input Box */
.post-search-container #postSearchInput {
    flex: 1 1 200px;
    padding: 8px 12px;
    border: 1px solid rgba(92, 29, 6, 0.25);
    border-radius: 8px;
    background-color: #ffffff;
    color: #3a1406;
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-search-container #postSearchInput:focus {
    outline: none;
    border-color: #5c1d06;
    box-shadow: 0 3px 10px rgba(92, 29, 6, 0.12);
}

/* Shared Button Base Styles (Scoped strictly to search bar) */
.post-search-container button {
    border-radius: 8px;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 9px 14px;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Primary SEARCH Button */
.post-search-container .btn-table-search {
    background-color: #5c1d06;
    color: #ffffff;
    border: 1px solid #5c1d06;
}

.post-search-container .btn-table-search:hover {
    background-color: #7c2a0c;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(92, 29, 6, 0.2);
}

/* Secondary CLEAR Button */
.post-search-container .btn-table-clear {
    background-color: #ffffff;
    color: #5c1d06;
    border: 1px solid rgba(92, 29, 6, 0.25);
}

.post-search-container .btn-table-clear:hover {
    background-color: #f8dfd2;
    border-color: rgba(92, 29, 6, 0.45);
    transform: translateY(-1px);
}

/* Status Message (hidden when empty so there's no blank gap) */
.post-search-container #searchStatus {
    margin: 8px 0 0 0;
    font-weight: 600;
    color: #3a1406;
    font-size: 0.9em;
}

.post-search-container #searchStatus:empty {
    display: none;
}

