/* Orienteering Result Manager Frontend Styles */

/* contain: inline-size tells the browser this element's width is independent of its content.
   This breaks the chain where a wide table expands the Elementor flex item and then the whole page.
   overflow-x: auto then creates a scrollbar for the contained wide content. */
.orm-results-container,
.orm-season-results-container,
.orm-all-time-results-container,
.orm-all-seasons-container {
    margin: 0 0 20px 0;
    padding: 10px;
    background: #fafbfa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(34,51,15,0.06);
    overflow-x: auto;
    contain: inline-size;
}

/* Common Filter Styles */
.orm-results-container label,
.orm-season-results-container label,
.orm-results-container select,
.orm-season-results-container select {
    margin-right: 12px;
    margin-bottom: 12px;
    vertical-align: middle;
}

.orm-results-container label,
.orm-season-results-container label {
    font-weight: 600;
    font-size: 1em;
}

.orm-results-container select,
.orm-season-results-container select {
    min-width: 130px;
    padding: 4px 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #fff;
    font-size: 1em;
}

/* All-seasons table has no container wrapper, so it scrolls itself */
.orm-all-seasons-table {
    display: block;
    overflow-x: auto;
}

/* Common Table Styles */
.orm-results-table,
.orm-season-results-table,
.orm-all-seasons-table,
.orm-all-time-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 1em;
    font-family: Arial, sans-serif;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

/* Common Header Styles */
.orm-results-table thead tr,
.orm-season-results-table thead tr,
.orm-all-seasons-table thead tr,
.orm-all-time-table thead tr {
    background-color: #22330f !important;
    color: #ffffff;
    text-align: center;
}

.orm-results-table th,
.orm-season-results-table th,
.orm-all-seasons-table th,
.orm-all-time-table th {
    background-color: #22330f !important;
    color: #ffffff;
    padding: 6px 10px;
    font-size: 1.05em;
    letter-spacing: 0.02em;
}

/* Common Cell Styles */
.orm-results-table td,
.orm-season-results-table td,
.orm-all-seasons-table td,
.orm-all-time-table td {
    padding: 6px 10px;
    text-align: center;
}

/* Common Row Styles */
.orm-results-table tbody tr,
.orm-season-results-table tbody tr,
.orm-all-seasons-table tbody tr,
.orm-all-time-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.orm-results-table tbody tr:nth-of-type(even),
.orm-season-results-table tbody tr:nth-of-type(even),
.orm-all-seasons-table tbody tr:nth-of-type(even),
.orm-all-time-table tbody tr:nth-of-type(even) {
    background-color: #f8f8f8;
}

.orm-results-table tbody tr:last-of-type,
.orm-season-results-table tbody tr:last-of-type,
.orm-all-seasons-table tbody tr:last-of-type,
.orm-all-time-table tbody tr:last-of-type {
    border-bottom: 2px solid #22330f;
}

/* Common Hover Effects */
.orm-results-table tbody tr:hover,
.orm-season-results-table tbody tr:hover,
.orm-all-seasons-table tbody tr:hover,
.orm-all-time-table tbody tr:hover {
    background-color: #f0f0f0;
}

/* Special row styles */
.orm-results-table tbody tr.not-accepted {
    background-color: #ffebee !important;
}

/* Numeric cell alignment */
.numeric {
    text-align: right;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .orm-results-table,
    .orm-season-results-table,
    .orm-all-seasons-table,
    .orm-all-time-table {
        display: block;
        overflow-x: auto;
    }
    
    .orm-results-container,
    .orm-season-results-container,
    .orm-all-time-results-container {
        padding: 8px 2px 2px 2px;
    }
    
    .orm-results-container label,
    .orm-season-results-container label,
    .orm-results-container select,
    .orm-season-results-container select {
        margin-bottom: 6px;
        font-size: 0.98em;
    }
    
    .orm-results-table th,
    .orm-season-results-table th,
    .orm-all-seasons-table th,
    .orm-all-time-table th,
    .orm-results-table td,
    .orm-season-results-table td,
    .orm-all-seasons-table td,
    .orm-all-time-table td {
        font-size: 0.95em;
        padding: 4px 4px;
    }
}

/* Form element styles */
form {
    margin-bottom: 20px;
}

select {
    padding: 1px 4px;
    margin: 0 10px 0 5px;
    height: 22px;
    min-width: 120px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-color: white;
    font-size: 0.95em;
}

label {
    margin-right: 5px;
    font-weight: normal;
    display: inline-block;
    vertical-align: middle;
}

/* Filter form specific styles */
form select:first-child {
    margin-left: 0;
}

form select:last-child {
    margin-right: 0;
}

/* Filter Form */
.orm-filter-form {
    margin-bottom: 1.5em;
    padding: 1em;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.orm-filter-form .form-group {
    margin-bottom: 1em;
}

.orm-filter-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.orm-filter-form select,
.orm-filter-form input {
    width: 100%;
    padding: 0.25em;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.orm-filter-form button {
    background-color: #0073aa;
    color: white;
    padding: 0.5em 1em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.orm-filter-form button:hover {
    background-color: #005177;
}

/* --- Table Improvements --- */
.orm-season-results-table th,
.orm-season-results-table td {
    text-align: center;
}
.orm-season-results-table th {
    font-size: 1.05em;
    letter-spacing: 0.02em;
}
.orm-season-results-table tbody tr:hover {
    background-color: #e6f2e6;
}

/* --- Responsive Tweaks --- */
@media screen and (max-width: 600px) {
    .orm-season-results-container {
        padding: 8px 2px 2px 2px;
    }
    .orm-season-results-table th,
    .orm-season-results-table td {
        font-size: 0.95em;
        padding: 4px 4px;
    }
    .orm-season-results-container label,
    .orm-season-results-container select {
        margin-bottom: 6px;
        font-size: 0.98em;
    }
} 