/* styles.css */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #004080;
    color: white;
    padding: 20px 0;
    text-align: center;
}

nav a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
}

main {
    padding: 20px;
    padding-bottom: 80px; /* Added padding to prevent footer overlap */
}

#graphs, #contestantsStats, #oppgaverStats, #oppgaverFilters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-bottom: 40px;
}

.chart-container {
    width: 100%;
    max-width: 600px;
    margin: 20px 0;
}

canvas {
    width: 100% !important;
    height: auto !important;
}

#filters, #search {
    margin-bottom: 20px;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
}

.filter-group {
    margin: 10px 0;
}

.filter-group label {
    margin-right: 10px;
}

#search input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    margin-bottom: 40px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    word-wrap: break-word;
    max-width: 200px; /* Optional: Limit max width for better layout */
}

table th {
    background-color: #004080;
    color: white;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    table th, table td {
        font-size: 12px;
        padding: 6px;
    }

    #filters, #search {
        padding: 10px;
    }
}

footer {
    background-color: #004080;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Additional Styles for Expandable Rows */
.table .collapse-row {
    background-color: #f9f9f9;
}

.table .collapse-row td {
    padding: 15px;
}

/* Styles for Spectrum Bar */
.spectrum-bar-container {
    margin-bottom: 10px;
}

.spectrum-bar {
    position: relative;
    height: 40px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.spectrum-mark {
    position: absolute;
    bottom: 0;
    width: 2px;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.spectrum-mark span {
    position: absolute;
    bottom: -20px;
    font-size: 12px;
    transform: translateX(-50%);
}

.spectrum-legend {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 5px;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Card Styles */
.task-details .card {
    border: none;
}

.task-details p {
    margin: 5px 0;
}

/* Modern Spectrum Bar Enhancements */
.task-details .spectrum-bar-container {
    position: relative;
}

.task-details .spectrum-bar {
    position: relative;
    height: 50px;
    background-color: #f0f0f0;
    border-radius: 25px;
    overflow: hidden;
}

.task-details .spectrum-mark {
    position: absolute;
    bottom: 0;
    width: 4px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-details .spectrum-mark span {
    position: absolute;
    bottom: -25px;
    font-size: 12px;
    white-space: nowrap;
}

.task-details .spectrum-legend {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 10px;
}

.task-details .spectrum-legend div {
    display: flex;
    align-items: center;
}

.task-details .spectrum-legend .legend-color {
    width: 14px;
    height: 14px;
    margin-right: 5px;
    border-radius: 2px;
}

/* Styling for the expanded child row content */
.task-details {
    padding: 10px;
}