/* Root styles */
#root {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    background-color: white;
    overflow-x: hidden;
    font-family: "Space Grotesk", "Noto Sans", sans-serif;
}

/* Container styles */
#container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

/* Header styles */
#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    border-bottom: 1px solid #f0f4f4;
    padding: 0.75rem 2.5rem;
}

/* Header content styles */
#header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #111817;
}

/* Logo styles */
#logo {
    width: 1rem;
    height: 1rem;
}

/* Site title styles */
#site-title {
    color: #111817;
    font-size: 1.125rem;
    font-weight: bold;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

/* Main content styles */
#main {
    display: flex;
    flex: 1;
    justify-content: center;
    padding: 1.25rem 2rem;
}

#content {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 960px;
}

/* Room title styles */
#title-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
}

#room-title {
    color: #111817;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.25;
    min-width: 18rem;
}

/* Sensor status styles */
#sensor-status {
    display: flex;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-light {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #6c757d;
}

/* Options styles */
#options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem 1rem;
}

/* Option Groups */
.option-group {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f0f4f4;
    border-radius: 1rem;
    padding: 0.25rem;
    overflow: hidden;
}

.option-group .slider {
    position: absolute;
    top: 25%;
    left: 2.5%;
    width: calc(90% / var(--option-count));
    height: 45%;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    padding: 0.1rem 0;
    transition: transform 0.3s ease;
    z-index: 0;
}


#time-scale-slider {
    left: 1%;
}

.option-label {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 80px;
    height: 100%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
    color: #638884;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
}

.option-label input {
    display: none;
}

.option-label span {
    width: 100%;
    text-align: center;
    padding: 0.25rem 0;
    border-radius: 0.75rem;
}

.option-label input:checked + span {
    color: #111817;

}

/* Custom Date Range */
#customDateRange {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Update Controls */
#update-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Auto Update Checkbox */
#auto-update {
    display: flex;
    align-items: center;
}

.interval-label {
    font-weight: bold;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #638884;
    font-size: 0.875rem;
    font-weight: 500;
}

.checkbox-label input {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* Chart container */
#chart-container {
    padding: 1rem;
}

/* Cards container */
#cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 1rem;
}

/* Card styles */
.card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 18rem;
    gap: 0.5rem;
    border: 1px solid #dce5e4;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* Card title */
.card-title {
    color: #111817;
    font-size: 1rem;
    font-weight: 500;
    line-height: normal;
}

/* Card value */
.card-value {
    color: #111817;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card extremes */
.card-extremes {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.highest-temp {
    color: #d64545;
}

.lowest-temp {
    color: #5ebd43;
}

.highest-humidity {
    color: #5A93C9;
}

.lowest-humidity {
    color: #74bde1;
}

/* Last update styles */
.last-update {
    color: #6c757d;
    font-size: 1em;
    padding: 0.75rem 1rem;
    text-align: right;
}

/* Data Table styles */
#toggleTable {
    margin: 20px 1rem;
    padding: 0.75rem 1.5rem;
    /*background-color: #007bff;*/
    background-color: #f0f4f4;

    color: #597d79;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-family: "Space Grotesk", "Noto Sans", sans-serif;

}

#toggleTable:hover {
    /*background-color: #0056b3;*/
    color: black;
}

#dataTableContainer {
    margin: 20px 1rem;
    overflow-x: auto;
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
}

#dataTable th,
#dataTable td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: center;
}

#dataTable th {
    background-color: #e9ecef;
    color: #495057;
}

#dataTable tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Specific option group counts */
#option-buttons {
    --option-count: 3;
}

#time-scale-buttons {
    --option-count: 6;
}

#update-interval-buttons {
    --option-count: 3;
}

/* Responsive styles */
@media (max-width: 768px) {
    /* Adjust update controls for small screens */
    #update-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
