/* ==========================================================
   ENERGY FUNDAMENTALS
   ========================================================== */

.energy-country-section {
    padding-top: 26px;
    padding-bottom: 60px;
}


/* ==========================================================
   FOOTER
   ========================================================== */

.footer {
    margin-top: 70px;
    background: #0b0b0b;
    border-top: 1px solid #222;
    color: #a8a8a8;
}

.footer-container {
    padding-top: 45px;
    padding-bottom: 25px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

.footer-brand-section {
    max-width: 460px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    margin-bottom: 14px;
}

.footer-brand span {
    color: #d4af37;
}

.footer-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #888;
}

.footer-info {
    max-width: 420px;
}

.footer-info-title {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-info-text {
    font-size: 13px;
    line-height: 1.7;
    color: #777;
}

.footer-divider {
    height: 1px;
    background: #242424;
    margin: 35px 0 22px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-copyright {
    font-size: 12px;
    color: #777;
    white-space: nowrap;
}

.footer-disclaimer {
    max-width: 600px;
    text-align: right;
    font-size: 11px;
    line-height: 1.6;
    color: #666;
}

@media (max-width: 768px) {

    .footer {
        margin-top: 50px;
    }

    .footer-container {
        padding-top: 35px;
        padding-bottom: 22px;
    }

    .footer-top {
        flex-direction: column;
        gap: 30px;
    }

    .footer-divider {
        margin: 30px 0 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer-disclaimer {
        text-align: left;
    }

}


.energy-page-description {
    margin-top: 6px;
    opacity: 0.68;
    font-size: 14px;
}


/* ==========================================================
   COUNTRY GRID
   ========================================================== */

.energy-country-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 14px;

    margin-top: 22px;
}


/* ==========================================================
   COUNTRY CARD
   ========================================================== */

.energy-country-card {
    appearance: none;

    width: 100%;
    min-height: 96px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px;

    background:
        rgba(255, 255, 255, 0.035);

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    border-radius: 10px;

    color: inherit;
    font: inherit;

    text-align: left;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}


.energy-country-card:hover {
    background:
        rgba(255, 255, 255, 0.06);

    border-color:
        rgba(214, 164, 60, 0.55);

    transform:
        translateY(-2px);
}


.energy-country-info {
    min-width: 0;
}


.energy-country-name {
    font-size: 16px;
    font-weight: 600;
}


.energy-country-code {
    margin-top: 6px;

    font-size: 12px;

    opacity: 0.50;

    letter-spacing: 0.08em;
}


/* ==========================================================
   COUNTRY ARROW
   ========================================================== */

.energy-country-arrow {
    width: 22px;
    height: 22px;

    flex-shrink: 0;

    margin-left: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #d6a43c;

    transition:
        transform 0.18s ease,
        color 0.18s ease;
}


.energy-country-arrow svg {
    width: 18px;
    height: 18px;

    display: block;
}


.energy-country-arrow path {
    fill: none;

    stroke: currentColor;

    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


.energy-country-card:hover
.energy-country-arrow {
    transform:
        translate(
            2px,
            -2px
        );

    color: #e1b84c;
}


/* ==========================================================
   OVERLAY
   ========================================================== */

.energy-modal-overlay {
    display: none;

    position: fixed;

    inset: 0;

    z-index: 9998;

    background:
        rgba(0, 0, 0, 0.72);

    backdrop-filter:
        blur(3px);
}


.energy-modal-overlay.open {
    display: block;
}


/* ==========================================================
   MODAL
   ========================================================== */

.energy-modal {
    display: none;

    position: fixed;

    z-index: 9999;

    top: 50%;
    left: 50%;

    transform:
        translate(
            -50%,
            -50%
        );

    width:
        min(
            1100px,
            calc(100% - 30px)
        );

    max-height:
        calc(
            100vh - 50px
        );

    overflow-y: auto;

    background: #111;

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 14px;

    box-shadow:
        0 25px 80px
        rgba(0, 0, 0, 0.55);

    color: inherit;
}


.energy-modal.open {
    display: block;
}


body.energy-modal-open {
    overflow: hidden;
}


/* ==========================================================
   MODAL HEADER
   ========================================================== */

.energy-modal-header {
    display: flex;

    justify-content:
        space-between;

    align-items:
        flex-start;

    gap: 20px;

    padding:
        22px 24px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.09);
}


.energy-modal-header h2 {
    margin: 0;
}


.energy-modal-meta {
    margin-top: 7px;

    font-size: 13px;

    opacity: 0.58;
}


.energy-modal-close {
    appearance: none;

    border: 0;

    background: transparent;

    color: inherit;

    font-size: 30px;

    line-height: 1;

    cursor: pointer;

    opacity: 0.65;
}


.energy-modal-close:hover {
    opacity: 1;
}


/* ==========================================================
   DATASET TABS
   ========================================================== */

.energy-dataset-tabs {
    display: flex;

    gap: 8px;

    padding:
        18px 24px 0;
}


.energy-dataset-tab {
    appearance: none;

    min-width: 105px;

    padding:
        10px 18px;

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 8px;

    background:
        rgba(255, 255, 255, 0.035);

    color: inherit;

    font: inherit;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
}


.energy-dataset-tab:hover {
    border-color:
        rgba(214, 164, 60, 0.55);
}


.energy-dataset-tab.active {
    color: #d6a43c;

    border-color:
        #d6a43c;

    background:
        rgba(214, 164, 60, 0.10);
}


/* ==========================================================
   PRODUCT BOXES
   ========================================================== */

.energy-product-list {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;

    padding:
        14px 24px 0;
}


.energy-product-box {
    appearance: none;

    padding:
        9px 14px;

    border-radius: 7px;

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    background:
        rgba(255, 255, 255, 0.035);

    color: inherit;

    font: inherit;

    font-size: 13px;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
}


.energy-product-box:hover {
    border-color:
        rgba(214, 164, 60, 0.55);
}


.energy-product-box.active {
    color: #d6a43c;

    border-color:
        #d6a43c;

    background:
        rgba(214, 164, 60, 0.12);
}


/* ==========================================================
   MODAL BODY
   ========================================================== */

.energy-modal-body {
    padding:
        22px 24px 26px;
}


/* ==========================================================
   DATASET LABEL
   ========================================================== */

.energy-dataset-label {
    margin-bottom: 14px;

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    color: #d6a43c;
}


/* ==========================================================
   METRICS
   ========================================================== */

.energy-popup-metrics {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 12px;
}


.energy-metric-card {
    padding: 17px;

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.025);
}


.energy-metric-label {
    font-size: 12px;

    opacity: 0.55;
}


.energy-metric-value {
    margin-top: 7px;

    font-size: 25px;

    font-weight: 650;
}


.energy-metric-unit {
    min-height: 13px;

    margin-top: 3px;

    font-size: 11px;

    opacity: 0.50;
}


/* ==========================================================
   DETAIL FUNDAMENTALS
   ========================================================== */

.energy-detail-panel,
.energy-history {
    margin-top: 20px;

    padding: 18px;

    border:
        1px solid
        rgba(255, 255, 255, 0.09);

    border-radius: 9px;
}


.energy-popup-section-title {
    margin-bottom: 10px;

    font-size: 15px;

    font-weight: 600;
}


.energy-detail-row {
    display: flex;

    justify-content:
        space-between;

    align-items: center;

    gap: 20px;

    padding:
        11px 0;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.07);

    font-size: 13px;
}


.energy-detail-row:last-child {
    border-bottom: 0;
}


.energy-detail-row strong {
    text-align: right;
}


/* ==========================================================
   HISTORY
   ========================================================== */

.energy-table-wrapper {
    width: 100%;

    overflow-x: auto;
}


.energy-history-table {
    width: 100%;

    border-collapse:
        collapse;

    white-space: nowrap;

    font-size: 12px;
}


.energy-history-table th,
.energy-history-table td {
    padding:
        10px 12px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.07);

    text-align: right;
}


.energy-history-table th:first-child,
.energy-history-table td:first-child {
    text-align: left;
}


.energy-history-table th {
    opacity: 0.55;

    font-weight: 500;
}


/* ==========================================================
   STATES
   ========================================================== */

.energy-loading,
.energy-error,
.energy-empty {
    padding:
        50px 20px;

    text-align: center;

    opacity: 0.65;
}


.energy-error {
    color: #e57373;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (
    max-width: 1000px
) {

    .energy-country-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }


    .energy-popup-metrics {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


@media (
    max-width: 700px
) {

    .energy-country-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }


    .energy-modal {
        width:
            calc(100% - 18px);

        max-height:
            calc(100vh - 18px);
    }


    .energy-modal-header,
    .energy-modal-body {
        padding: 18px;
    }


    .energy-dataset-tabs {
        padding:
            14px 18px 0;
    }


    .energy-product-list {
        padding:
            12px 18px 0;
    }

}


@media (
    max-width: 450px
) {

    .energy-country-grid {
        grid-template-columns:
            1fr;
    }


    .energy-popup-metrics {
        grid-template-columns:
            1fr;
    }


    .energy-dataset-tabs {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }


    .energy-dataset-tab {
        min-width: 0;
    }

}