:root {
    --fadedlightgreen: #e0edb9;
}

body,
body * {
    font-family: 'Nunito', sans-serif;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.section {
    padding-top: 2rem;
    margin-bottom: 6rem;
}

#potencia-section,
#opcao-horaria-section,
#ciclo-section,
#preco-section,
#info-section,
#bottom-section {
    display: block;
    transition: opacity 0.5s ease;
}

.section-title {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 2rem;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--darkgreen);
    text-align: center;
    margin-bottom: 2rem;
}

/* SECTION: TARIFÁRIO */

#tarifario-section {
    margin-top: 4rem;
}

.tarifario-options {
    display: flex;
    justify-content: space-between;
}

.tarifario-box {
    width: 450px;
    height: 200px;
    border: 2px solid var(--darkgreen);
    border-radius: 8px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tarifario-box:hover,
.tarifario-box.selected {
    background-color: var(--darkgreen);
    scale: 1.1;
}

.tarifario-box:hover .tarifario-title,
.tarifario-box.selected .tarifario-title {
    color: var(--lightyellow);
}

.tarifario-box:hover .tarifario-desc,
.tarifario-box.selected .tarifario-desc {
    color: var(--yellowgreen);
}

.tarifario-title {
    font-weight: 800;
    font-size: 1.6rem;
    text-align: left;
    color: var(--darkgreen);
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.tarifario-desc {
    font-weight: 500;
    font-size: 1rem;
    text-align: left;
}

/* SECTION: POTÊNCIA CONTRATADA */

#potencia-section {
    margin-bottom: 8rem;
}

.potencia-slider-container {
    position: relative;
    width: 1000px;
    margin: 40px 0;
}

.potencia-slider {
    margin: auto;
    width: 90%;
    height: 8px;
    background-color: var(--darkgreen);
    position: relative;
}

.marker-container {
    position: absolute;
    left: 0;
    top: -8px;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    will-change: transform;
}

.potencia-marker {
    width: 24px;
    height: 24px;
    background-color: var(--yellowgreen);
    border: 4px solid var(--darkgreen);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2;
    transform: translateX(0) scale(1);
}

.potencia-value {
    font-weight: 800;
    font-size: 1rem;
    color: var(--darkgreen);
    cursor: pointer;
    transition: transform 0.3s ease;
    white-space: nowrap;
    z-index: 1;
    margin-top: 8px;
    transform: scale(1);
}

/* Estados de hover e seleção */
.potencia-marker:hover,
.potencia-marker.selected {
    background-color: var(--darkgreen)!important;
    transform: scale(1.5);
}

.potencia-value:hover,
.potencia-value.selected {
    transform: scale(1.5);
    font-weight: 900;
}

.potencia-marker:hover:not(.selected) {
    background-color: var(--yellowgreen);
    transform: scale(1.3) !important;
}

.potencia-value:hover:not(.selected) {
    transform: scale(1.3) !important;
}

/* SECTION: OPÇÃO HORÁRIA/CICLO */

.opcao-horaria-options,
.ciclo-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.opcao-horaria-btn,
.ciclo-btn {
    width: 200px;
    height: 50px;
    border: 2px solid var(--darkgreen);
    border-radius: 50px;
    background: none;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--darkgreen);
    cursor: pointer;
    transition: all 0.3s ease;
}

.opcao-horaria-btn:hover,
.opcao-horaria-btn.selected,
.ciclo-btn:hover,
.ciclo-btn.selected {
    background-color: var(--darkgreen);
    color: var(--yellowgreen);
}

/* SECTION: PREÇO */
.preco-boxes {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.preco-box {
    width: 225px;
    height: 100px;
    background-color: var(--darkgreen);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.preco-label {
    font-weight: 400;
    text-transform: uppercase;
    color: var(--yellowgreen);
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
}

.preco-value {
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--lightyellow);
    text-align: center;
    padding-right: 1rem;
}

.preco-kva {
    font-size: 0.8rem;
    text-transform: none;
}

/* Value controls */
.preco-value-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.value-controls {
    position: absolute;
    right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-arrow {
    color: var(--lightyellow);
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 0.8;
    user-select: none;
    transition: all 0.5s;
}

.control-arrow:hover {
    color: var(--newgreen);
    scale: 1.5;
}

.control-arrow.up {
    margin-bottom: 2px;
}

.preco-box {
    position: relative;
}

/* Simulação */
.simulacao-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    color: var(--darkgreen);
    margin-bottom: 2rem;
}

.simulacao-input input {
    width: 100px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid var(--darkgreen);
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
    background-color: var(--yellowgreen);
    color: var(--darkgreen);
    padding: 0 10px;
}

.simulacao-input input::placeholder {
    color: var(--darkgreen)!important;
    opacity: 1;
    text-align: center;
}

.simulacao-input input:focus {
    outline: none;
    color: var(--darkgreen);
    background-color: var(--lightyellow);
}

/* Hide standard input arrows */
.simulacao-input input::-webkit-outer-spin-button,
.simulacao-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.simulacao-input input[type=number] {
    -moz-appearance: textfield;
}

/* Arrows */
.number-controls {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.number-arrow {
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--darkgreen);
    user-select: none;
    padding: 0 5px;
}

.number-arrow:hover {
    color: var(--lightyellow);
    scale: 1.5;
    transition: all 0.5s;
}

/* Table - Preço */
.preco-table {
    width: 100%;
    margin-bottom: 2rem;
    border-collapse: collapse;
}

.preco-table th {
    border-bottom: 2px solid var(--darkgreen);
}

table.preco-table th.preco-table-header {
    font-family: 'Nunito', sans-serif;
    font-weight: 700 !important;
    width: 50%;
    font-size: 0.9rem;
    text-align: center;
    text-transform: uppercase;
    color: var(--darkgreen);
    padding: 10px;
}

.preco-table td {
    text-align: center;
    padding: 2rem;
    border-bottom: 2px solid var(--darkgreen);
}

#energia-cell {
    padding: 0;
}

.energy-container {
    display: block;
}

.energy-values {
    display: flex;
    justify-content: space-between;
}

.period {
    font-weight: 400;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--darkgreen);
    flex: 1;
    text-align: center;
}

.value {
    flex: 1;
    text-align: center;
}

.potencia-cell {
    font-weight: 700;
    font-size: 1.3rem;
}

.potencia-unit {
    font-weight: 500;
    font-size: 0.9rem;
}

.disclaimer {
    text-align: center;
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* SECTION: INFO */

#info-section.visible {
    display: block;
    opacity: 1;
}

/* Buttons container */
.info-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 20px;
    flex-wrap: wrap;
}

/* Individual button */
.info-btn {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--fadedlightgreen);
    width: 300px;
    height: 100px;
    border-radius: 8px;
    padding: 0 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

/* Button states */
.info-btn:hover,
.info-btn.selected {
    background-color: var(--darkgreen);
    scale: 1.1;
}

.info-icon {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    margin-right: 1.5rem;
    align-self: center;
    position: relative;
    top: 0;
}

/* Button text */
.info-btn-text {
    position: relative;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--darkgreen);
    line-height: 1.3;
    transition: color 0.3s ease;
}

/* Icon color change */
.info-btn:hover .info-icon,
.info-btn.selected .info-icon {
    filter: brightness(250%) sepia(100%) saturate(50%) hue-rotate(20deg);
}

/* Text color change */
.info-btn:hover .info-btn-text,
.info-btn.selected .info-btn-text {
    color: var(--yellowgreen);
}

.info-content {
    display: none;
    margin-top: 2.5rem;
}

.info-content.active {
    display: block;
}

.info-title {
    color: var(--darkgreen);
    font-weight: 700;
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.info-subtitle {
    color: var(--darkgreen);
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.info-divider {
    height: 2px;
    width: 100%;
    background-color: var(--darkgreen);
    margin-bottom: 1.5rem;
}

.info-text {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 2;
}

.info-text-small {
    font-weight: 500;
    font-size: 0.7rem;
}

.info-content ul {
    padding-left: 1.5rem;
    list-style-type: disc;
    margin: 1rem 0;
}

.info-content li {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--darkgreen);
    margin-bottom: 0.25rem;
    list-style-position: outside;
}

.info-columns {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
}

.info-column {
    flex: 1;
    min-width: 0;
    padding: 0 1.5rem;
    position: relative;
    margin-bottom: 2rem;
}

/* Dividers between columns */
.info-column:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    width: 2px;
    background-color: var(--darkgreen);
}

.info-column-divider {
    display: none;
}

/* SECTION: BOTTOM */

#bottom-section.visible {
    display: block;
    opacity: 1;
}

.bottom-buttons {
    display: flex;
    justify-content: center;
    border-radius: 100px;
    gap: 2rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.bottom-btn {
    width: 10rem;
    height: 3rem;
    border: 2px solid var(--darkgreen);
    border-radius: 100px;
    background-color: var(--darkgreen);
    color: var(--yellowgreen);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.bottom-btn:hover {
    color: var(--yellowgreen);
    scale: 1.2;
    transition: all 0.5s ease;
}

/* Simulação BTE e MT */
#obter-simulacao {
    text-align: center;
    margin: 2rem;
}

/*****************/
/* MEDIA QUERIES */
/*****************/

/* Below 1200px */
@media (max-width: 1200px) {
    .section-title {
        font-size: 1.8rem;
    }

    .tarifario-options {
        justify-content: space-around;
    }

    .tarifario-box {
        width: 40%;
        height: 192px;
        padding: 1.2rem;
        padding-top: 2rem;
    }

    .potencia-slider-container {
        width: 100%;
    }

    .info-content {
        display: none;
        margin-top: 4rem;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        padding: 0 2rem;
    }
}

/* Below 992px */
@media (max-width: 992px) {
    .tarifario-title {
        margin-bottom: 1rem;
    }

    .potencia-marker {
        width: 20px;
        height: 20px;
        border: 3px solid var(--darkgreen);
    }

    .marker-container {
        top: -7px;
    }

    .potencia-value {
        font-size: 0.9rem;
    }

    .preco-box {
        width: calc(50% - 1rem);
        margin-bottom: 1rem;
    }

    .potencia-cell {
        font-size: 1.1rem;
    }

    .potencia-unit {
        font-size: 0.8rem;
    }

    .info-buttons {
        justify-content: space-evenly;
    }

    .info-btn {
        width: 30%;
        height: 80px;
    }

    .info-icon {
        width: 1.5rem;
        height: 1.5rem;
        margin-right: 1rem;
    }

    .info-btn-text {
        font-size: 0.7rem;
    }

    .info-title {
        font-size: 1.2rem;
    }
}

/* Below 768px */
@media (max-width: 768px) {
    .tarifario-options {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .tarifario-box {
        width: 75%;
    }

    .potencia-slider {
        height: 6px;
    }

    .potencia-marker {
        width: 16px;
        height: 16px;
    }

    .marker-container {
        top: -6px;
    }

    .potencia-value {
        font-size: 0.8rem;
    }

    #energia-cell {
        padding: 1rem !important;
    }

    .energy-periods,
    .energy-values {
        flex-direction: column;
        gap: 0;
    }

    .period-value-row {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .period {
        font-size: 0.7rem;
        text-align: center;
        grid-column: 1;
    }

    .value {
        text-align: center;
        grid-column: 3;
    }

    .period-value-row::before {
        content: '';
        grid-column: 2;
        width: 1rem;
    }

    .potencia-cell,
    .potencia-unit {
        display: inline;
    }

    .info-btn {
        padding: 1rem;
        height: 7rem;
    }

    .info-icon {
        width: 1.2rem;
        height: 1.2rem;
        margin-right: 1.5rem;
    }

    .info-btn-text {
        font-size: 0.7rem;
    }

    .info-subtitle {
        font-size: 1.2rem;
    }

    .info-columns {
        flex-direction: column;
    }

    .info-column {
        padding: 0;
        margin-bottom: 2rem;
    }

    .info-column:not(:last-child)::after {
        display: none;
    }

    .info-column:not(:last-child) {
        border-bottom: 2px solid var(--darkgreen);
        padding-bottom: 2rem;
    }

    .info-content {
        width: 90%;
        padding: 0;
    }
}

/* Below 576px */
@media (max-width: 576px) {
    .tarifario-box {
        padding: 2rem;
        height: 160px;
    }

    .potencia-slider {
        height: 4px;
    }

    .potencia-value {
        font-size: 0.7rem;
    }

    .opcao-horaria-options,
    .ciclo-options {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .opcao-horaria-btn,
    .ciclo-btn {
        width: 100%;
        max-width: 250px;
        margin-bottom: 1rem;
    }

    .preco-box {
        width: 100%;
    }

    .info-buttons {
        flex-direction: column;
        align-items: center;
    }

    .info-btn {
        width: 75%;
        max-width: none;
        min-height: 80px;
        margin-bottom: 0;
    }

    .info-icon {
        width: 2rem;
        height: 2rem;
        margin-right: 1.5rem;
    }

    .info-btn-text {
         font-size: 0.8rem;
    }
}
