* {
    margin: 0;
    padding: 0;
    font-family: inherit;
    box-sizing: border-box;
}

:root {
    font-size: 62.5%;
    --text-color: #0f172a;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    color: var(--text-color);
    background-color: #F8FAFC;
    min-height: 100vh;
    display: flex;
    place-content: center;
}

main {
    margin: 5rem 0;
    background-color: white;
    border-radius: 1.6rem;
    padding: 6.4rem 8rem;
    box-shadow: 0rem 0.4rem 3.2rem rgba(15, 23, 42, 0.15);
    display: grid;
    gap: 6.4rem;
}

main section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.6rem;
    line-height: 2.4rem;
}

/* ===== CONVERTER SECTION ===== */

.converter-wrappers {
    display: flex;
    /* width: 100%; */
    gap: 1.6rem;
    align-items: center;
}

.converter-wrapper {
    position: relative;
    display: flex;
    border-radius: .8rem;
    width: 27rem;
    height: 5.6rem;
    background-color: white;
    outline: 1px solid #94A3B8;
}

.converter-wrapper:hover,
.converter-wrapper:has(:focus) {
    outline: 2.5px solid #7C3AED;
}

.converter-wrapper input {
    font-size: 1.6rem;
    appearance: textfield;
    padding: 1.6rem;
    border: 0;
    outline: none;
    width: 50%;
}

.dropdown {
    --bg-hover: #EDE9FE;
    width: 13rem;
    position: absolute;
    top: 0;
    right: 0;
    height: 5.6rem;
    overflow: hidden;
}

.dropdown:hover {
    height: fit-content;
    overflow: initial;
    z-index: 100;
}

.dropdown .selected-currency {
    height: 5.6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0 .8rem .8rem 0;
}

.fi.fis {
    font-size: 2.4rem;
    border-radius: 50%;
    margin-right: .8rem;
}

.dropdown .selected-currency:hover {
    background-color: var(--bg-hover);
}

.dropdown .selected-currency::before {
    content: "";
    background-color: #94A3B8;
    position: absolute;
    left: 0;
    height: 2.4rem;
    width: 0.1rem;
}

.dropdown .selected-currency::after {
    content: "";
    background: url(./assets/dropdown-arrow.svg) no-repeat;
    width: 2.4rem;
    height: 2.4rem;
    margin-left: 1rem;
}

.dropdown ul {
    background-color: white;
    margin-top: .8rem;
    list-style: none;
    width: 16rem;
    max-height: 17rem;
    overflow-y: scroll;
    box-shadow: 0rem 0.4rem 3.2rem rgba(15, 23, 42, 0.15);
    border-radius: .8rem;
}

.dropdown ul li {
    padding: 1.2rem 1.6rem;
}

.dropdown ul li:hover {
    background-color: var(--bg-hover);
}

.exchange-currency-button {
    border: none;
    height: 4rem;
    width: 4rem;
    background-color: transparent;
    cursor: pointer;
    border-radius: .5rem;
}

.exchange-currency-button:hover {
    background-color: #EDE9FE;
}

/* ===== EXCHANGE SECTION ===== */
.exchange-section .wrapper #chart .apexcharts-tooltip {
    border: none;
}

.exchange-section .wrapper #chart .tooltip {
    padding: 1.2rem;
    box-shadow: 0rem 0.4rem 3.2rem rgba(15, 23, 42, 0.15);
}

.exchange-section .wrapper .chart-time-buttons {
    display: flex;
    margin-left: 4.8rem;
    justify-content: space-between;
}

.exchange-section .wrapper .chart-time-buttons button {
    font-size: 14px;
    padding: .8rem 1.6rem;
    background-color: transparent;
    border: none;
    border-radius: 5rem;
    cursor: pointer;
    transition: background-color .3s, color .6s;
}

.exchange-section .wrapper .chart-time-buttons button.active,
.exchange-section .wrapper .chart-time-buttons button:hover {
    color: white;
    background-color: #7C3AED;
}

@media (max-width: 48rem) {
    main {
        max-width: 100vw;
        padding: 1.6rem;
        gap: 3.2rem;
    }

    main section h2 {
        font-size: 1.6rem;
    }

    .converter-section .converter-wrappers {
        flex-direction: column;
        gap: .8rem;
    }

    .converter-section .converter-wrappers .converter-wrapper {
        width: 100%;
    }


    .exchange-section .wrapper .chart-time-buttons {
        margin-left: 4.8rem;
    }

}