/* Estação Agrometeorológica - UFF - PURO
   Projeto financiado pela FAPERJ
   Bolsista: Bernardo Lannes
   Orientador: Fábio Gonçalves
   GitHub: https://github.com/BernardoLannes/Agrometeorological-Station
*/

body {
    min-width: 310px;
    max-width: 1280px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    text-align: center;
    top: 50%;
    left: 50%;
    width: 60%;
}

@media screen and (max-width: 800px) {
    body {
        width: 100%;
    }
}

h2 {
    font-size: 2rem;
    text-align: center;
}

.container {
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px;
    text-align: center;
}

th {
    background-color: #f2f2f2;
}

#tableReadings td, #tableReadings th {
    border: 1px solid #ddd;
    padding: 10px;
}

#tableReadings tr:nth-child(even) {
    background-color: #f2f2f2;
}

#tableReadings tr:hover {
    background-color: #ddd;
}

#tableReadings th {
    padding: 10px;
    background-color: #2f4468;
    color: white;
}

.download-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 20px;
    border-radius: 5px;
}

.download-button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Estilos adicionais para os gráficos (Highcharts) */
.highcharts-background {
    fill: #f4f4f4;
}

.highcharts-title {
    font-size: 20px;
    color: #333;
    font-weight: bold;
}

.highcharts-legend-item {
    font-size: 14px;
    color: #444;
}

.highcharts-yaxis-labels,
.highcharts-xaxis-labels {
    font-size: 12px;
    color: #333;
}

.highcharts-axis-title {
    font-size: 14px;
    color: #333;
}

.highcharts-series {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Estilo para os gauges */
.content {
    display: flex;
    flex-wrap: wrap; /* Permite quebrar linhas quando necessário */
    gap: 1rem;       /* Espaçamento entre os elementos */
    justify-content: center; /* Centraliza os gauges */
}

.mask {
    position: relative;
    overflow: hidden;
    display: block;
    width: 12.5rem;
    height: 6.25rem;
    margin: 1.25rem auto; /* Centraliza cada gauge */
}

.semi-circle {
    position: relative;
    display: block;
    width: 12.5rem;
    height: 6.25rem;
    background: linear-gradient(to right, #3498db 0%, #05b027 33%, #f1c40f 70%, #c0392b 100%);
    border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;
}

.semi-circle::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 2;
    display: block;
    width: 8.75rem;
    height: 4.375rem;
    margin-left: -4.375rem;
    background: #fff;
    border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;
}

.semi-circle--mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 12.5rem;
    height: 12.5rem;
    background: transparent;
    transform: rotate(120deg) translate3d(0, 0, 0);
    transform-origin: center center;
    backface-visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.semi-circle--mask::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0%;
    z-index: 2;
    display: block;
    width: 12.625rem;
    height: 6.375rem;
    margin: -1px 0 0 -1px;
    background: #f2f2f2;
    border-radius: 50% 50% 50% 50% / 100% 100% 0% 0%;
}

.gauge--2 .semi-circle {
    background: #3498db;
}

.gauge--2 .semi-circle--mask {
    transform: rotate(20deg) translate3d(0, 0, 0);
}
