body, html {
    background-color: var(--color-primary-darker);
    font-size: var(--font-xxs);
}

/*====================*/
/*      tooltip       */
/*====================*/
.tooltip-popup {
    position: fixed;
    z-index: 999;
    background-color: var(--grey8);
    color: var(--grey1);
    padding: 0.5em 0.75em;
    border-radius: 0.4rem;
    font-size: var(--font-xs);
    line-height: 1.4;
    max-width: 22rem;
    box-shadow: 0 2px 10px var(--grey9-50);
    pointer-events: none;
}

#spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.ring-spinner {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 0.35rem solid var(--color-primary-ultralight);
    border-top-color: var(--color-primary);
    animation: ring-spin 1.5s linear infinite;
}

@keyframes ring-spin {
    to { transform: rotate(360deg); }
}


/*====================*/
/*        page        */
/*====================*/
#page {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: min-content max-content 1fr max-content min-content;
    justify-items: center;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    transition: margin-top 0.5s ease-in-out;
}

#cards-container {
    width: var(--cards-width);
}

#card-plus {
    width: var(--cards-width);
    justify-items: center;
    border-radius: 1rem;
    margin-bottom: 1rem;
    line-height: 2rem;
    cursor: pointer;
    background-color: var(--color-primary-ultralight);
}

.currency-card.left, .currency-card.right {
    height:4rem;
}

#footer {
    width: var(--cards-width);
}

#language {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.lang-btn {
    cursor: pointer;
    padding: 0.2em 0.5em;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-primary-ultralight);
    opacity: 0.4;
    transition: opacity 100ms ease;
    user-select: none;
}

.lang-btn:hover {
    opacity: 0.75;
}

.lang-btn.active {
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    opacity: 1;
}

/* ============= */
/*     NAV       */
/* ============= */
.theme-nav {
    color: var(--color-primary-darker);
    background-color: var(--color-primary-ultralight);
}

#nav {
    width: 100%;
    transition: margin-top 0.5s ease-in-out;
    margin-bottom: 1rem;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    overflow: hidden;
}

#nav.close {
    margin-top: -4rem;
}
.fire-row {
    width: 100%;
    background-color: inherit;
    color: inherit;
    border-bottom-right-radius: 1rem;
    border-bottom-left-radius: 1rem;
    cursor: pointer;
}

#nav a:not(:hover) {
    text-decoration: none;
}

.nav-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    padding: 0 1rem;
    overflow: hidden;
}

.nav-right {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 2rem 2rem;
    align-items: end;
}


/* ==================== */
/*      PARAMETERS      */
/* ==================== */
.parameters {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    margin: 0;
    padding: 0;
}

.parameters-spacer {
    display: none;
}

.parameters-left {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: center;
    padding: 0.25rem 0.5rem;
}

.parameters-right {
    display: grid;
    grid-template-areas:
            "param-same buy buy-percent buy-fee"
            "param-same sell sell-percent sell-fee";
    grid-template-columns: auto auto auto 1fr;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    justify-items: center;
    padding: 0.25rem 0.5rem;
}

.param-same {
    grid-area: param-same;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.buy {
    grid-area: buy;
}
.buy-percent {
    grid-area: buy-percent;
}
.buy-fee {
    grid-area: buy-fee;
    white-space: nowrap;
}
.sell {
    grid-area: sell;
}
.sell-percent {
    grid-area: sell-percent;
}
.sell-fee {
    grid-area: sell-fee;
    white-space: nowrap;
}


/*====================*/
/*      dropdown      */
/*====================*/
#ddc {
}

#ddc .part1 {
    border-bottom: 1px solid var(--grey5);
}

#ddc .part2 {
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    display: grid;
    grid-template-columns: auto auto max-content 1fr;
    column-gap: 0.5rem;
}

#ddc .part2 .currency-item {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
}

.dropdown-click { /* class for elements to fire the drop-down, NEEDED */
    position: relative;
    cursor: pointer;
    text-decoration: underline;
}

.dropdown-content { /* class for elements to drop-down, NEEDED */
    position: absolute;
    top: -3000px;
    opacity: 0;
    min-width: fit-content;
    z-index: 99;
    margin: 0;
    padding: 15px 0;
    width: auto;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--grey5);
    scrollbar-width: none;
    border-radius: 20px;
    box-shadow: 3px 3px 10px 3px var(--color-primary-darker);
}

#ddc .part2 .currency-item {
    padding: 0.5rem 0.15rem 0.5rem 0.75rem;
    cursor: pointer;
    scroll-margin-top: 0.25rem;
}

#ddc .part2 .currency-item:hover {
    color: var(--grey1);
    background-color: var(--color-primary-dark);
}

#ddc .part2 .currency-item.active {
    color: var(--grey1);
    background-color: var(--color-primary-dark);
}

