/* =====================================================
   MARKETS
===================================================== */

.markets-section {
    width: 100%;
    margin: 35px 0;
    padding: 28px 0 30px;
    background: #000;
    color: #fff;
    border-radius: 0;
    overflow: hidden;
}

.markets-section *,
.markets-section *::before,
.markets-section *::after {
    box-sizing: border-box;
}


/* HEADER */

.markets-header {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto 22px;
    padding: 0 15px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.markets-label {
    display: inline-block;

    color: #64aaff;
    font-size: 12px;
    font-weight: 800;

    letter-spacing: .5px;

    border-bottom: 1px solid #64aaff;

    padding-bottom: 2px;
    margin-bottom: 7px;
}

.markets-heading h2 {
    margin: 0;

    color: #fff;

    font-size: 29px;
    line-height: 1.1;
    font-weight: 800;
}

.markets-description {
    max-width: 500px;

    text-align: right;

    color: #8995d3;

    font-size: 12px;
    line-height: 1.5;
}

.markets-description a {
    display: block;

    margin-top: 5px;

    color: #62b8ff;

    font-weight: 700;

    text-decoration: none;
}

.markets-description strong {
    font-size: 19px;
    margin-left: 5px;
}


/* GRID */

.markets-grid {
    width: 100%;
    max-width: 1080px;

    margin: 0 auto;

    padding: 0 15px;

    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));

    gap: 10px;
}


/* CARD */

.market-card {
    position: relative;

    min-width: 0;
    min-height: 186px;

    padding: 13px;

    border-radius: 10px;

    border: 1px solid
        rgba(255,255,255,.13);

    background:
        rgba(38,45,116,.72);

    overflow: hidden;

    transition:
        transform .2s ease,
        border-color .2s ease;
}

.market-card:hover {
    transform: translateY(-2px);

    border-color:
        rgba(255,255,255,.28);
}


/* CARD HEADER */

.market-card-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 5px;

    margin-bottom: 8px;
}

.market-card-title {
    color: #fff;

    font-size: 12px;
    font-weight: 800;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.market-card-source {
    flex-shrink: 0;

    color: #8d99d5;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: .5px;
}


/* VALUE */

.market-value {
    color: #fff;

    font-family:
        "Roboto Mono",
        monospace;

    font-size: 22px;

    line-height: 1.1;

    font-weight: 700;

    white-space: nowrap;
}


/* CHANGE */

.market-change {
    min-height: 18px;

    margin-top: 5px;

    font-family:
        "Roboto Mono",
        monospace;

    font-size: 10px;

    line-height: 1.2;
}

.market-change.up {
    color: #45e998;
}

.market-change.down {
    color: #ff6874;
}

.market-change.neutral {
    color: #8291d3;
}


/* CHART */

.market-chart {
    width: 100%;
    height: 53px;

    margin-top: 7px;
}

.market-chart svg {
    width: 100%;
    height: 100%;

    display: block;
}

.market-chart polyline {
    fill: none;

    stroke: #91a3e5;

    stroke-width: 2;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.market-chart.up polyline {
    stroke: #45e998;
}

.market-chart.down polyline {
    stroke: #ff705f;
}


/* UPDATE */

.market-update {
    margin-top: 3px;

    color: #7886cc;

    font-size: 9px;

    white-space: nowrap;
}


/* WEATHER */

.market-weather {
    min-width: 0;

    min-height: 186px;

    padding: 13px;

    border-radius: 10px;

    border: 1px solid
        rgba(255,255,255,.13);

    background:
        rgba(38,45,116,.72);
}

.weather-city {
    color: #76aaff;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: .8px;
}

.weather-time {
    margin-top: 2px;

    color: #fff;

    font-family:
        "Roboto Mono",
        monospace;

    font-size: 22px;

    font-weight: 700;
}

.weather-date {
    margin-top: 2px;

    color: #d4d9f4;

    font-size: 9px;
}

.weather-main {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 20px;
}

.weather-icon {
    width: 28px;

    color: #9aa9df;

    font-size: 22px;

    text-align: center;
}

.weather-temperature {
    color: #fff;

    font-size: 25px;

    font-weight: 700;
}

.weather-bottom {
    display: flex;

    justify-content: space-between;

    gap: 5px;

    margin-top: 8px;

    color: #b7c0e8;

    font-size: 9px;

    line-height: 1.5;
}

.weather-bottom-right {
    text-align: right;
}

.weather-wind {
    color: #8390d0;
}


/* LOADING */

.markets-loading {
    grid-column: 1 / -1;

    padding: 30px;

    text-align: center;

    color: #9ba5d9;

    font-size: 13px;
}


/* ERROR */

.markets-error {
    grid-column: 1 / -1;

    padding: 20px;

    color: #ff9ca5;

    text-align: center;

    font-size: 13px;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1100px) {

    .markets-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {

    .markets-section {
        margin: 25px 0;

        padding: 23px 0;
    }

    .markets-header {
        display: block;

        padding: 0 14px;
    }

    .markets-heading h2 {
        font-size: 24px;
    }

    .markets-description {
        margin-top: 10px;

        max-width: none;

        text-align: left;

        font-size: 10px;
    }

    .markets-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        padding: 0 14px;

        gap: 9px;
    }

    .market-card,
    .market-weather {
        min-height: 175px;

        padding: 11px;
    }

    .market-value {
        font-size: 20px;
    }

}


/* =====================================================
   VERY SMALL
===================================================== */

@media (max-width: 380px) {

    .markets-grid {
        grid-template-columns: 1fr;
    }

}