* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
       -moz-box-sizing: border-box;
            box-sizing: border-box;
}

html, body {
    width: 100%;
    width: 100vw;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: Almarai, Arial, sans-serif;
    direction: rtl;
    text-align: center;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.bg_color {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: #e6fdfc;
    opacity: 0.6;
}

.bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    opacity: 0.15;
    background-image: url('../../img/pattern.png');
    background-repeat: repeat;
    background-size: contain;
    background-position: center;
}

.content-wrapper {
    display: block;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    margin: 0 40px;
}

.header-bar {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
        -ms-flex-pack: justify;
            justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 20px;
}

.header-text {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
        -ms-flex-align: start;
            align-items: flex-start;
    text-align: right;
}

.logo-wrapper {
    -webkit-flex-shrink: 0;
        -ms-flex-negative: 0;
            flex-shrink: 0;
    -webkit-box-ordinal-group: 2;
    -webkit-order: 1;
        -ms-flex-order: 1;
            order: 1;
}

.logo-wrapper img {
    height: 55px;
    -webkit-filter: drop-shadow(0 4px 20px rgba(2, 80, 79, 0.2));
            filter: drop-shadow(0 4px 20px rgba(2, 80, 79, 0.2));
    -webkit-animation: logoEntry 1s ease-out forwards;
            animation: logoEntry 1s ease-out forwards;
}

@-webkit-keyframes logoEntry {
    from {
        opacity: 0;
        -webkit-transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1) translateY(0);
    }
}

@keyframes logoEntry {
    from {
        opacity: 0;
        -webkit-transform: scale(0.8) translateY(-20px);
            -ms-transform: scale(0.8) translateY(-20px);
                transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        -webkit-transform: scale(1) translateY(0);
            -ms-transform: scale(1) translateY(0);
                transform: scale(1) translateY(0);
    }
}

.page-title {
    color: #02504f;
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.update-info {
    color: #02504f;
    font-size: 1.1em;
    font-weight: 400;
}

.header-date {
    display: none;
}

/* Stays visible when animations are unsupported: opacity defaults to 1 and the
   `backwards` fill applies the hidden start state only while the delay runs. */
.price-table-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(2, 128, 120, 0.2);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    opacity: 1;
    -webkit-animation: tableEntry 0.8s ease-out 0.3s backwards;
            animation: tableEntry 0.8s ease-out 0.3s backwards;
}

@-webkit-keyframes tableEntry {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
    }
}

@keyframes tableEntry {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
            -ms-transform: translateY(30px);
                transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
            -ms-transform: translateY(0);
                transform: translateY(0);
    }
}

.price-table {
    border-collapse: separate;
    border-spacing: 0 8px;
    width: 100%;
    min-width: 650px;
}

.price-table thead th {
    color: #02504f;
    font-size: 1.4em;
    font-weight: 700;
    padding: 12px 30px;
    text-align: center;
    border-bottom: 2px solid #028078;
    white-space: nowrap;
}

.price-table tbody tr {
    background: #e6fdfc;
    border-radius: 12px;
    -webkit-transition: all 0.3s ease;
            transition: all 0.3s ease;
}

.price-table tbody tr:hover {
    background: #b5f5f2;
    -webkit-transform: scale(1.02);
        -ms-transform: scale(1.02);
            transform: scale(1.02);
}

.price-table tbody td {
    padding: 12px 30px;
    text-align: center;
    color: #013f3b;
    font-size: 2.8em;
    font-weight: 700;
    white-space: nowrap;
}

.price-table tbody tr td:first-child {
    border-radius: 0 12px 12px 0;
    color: #02504f;
    font-weight: 800;
    font-size: 2.2em;
}

.price-table tbody tr td:last-child {
    border-radius: 12px 0 0 12px;
}

.price-value {
    direction: ltr;
    display: inline-block;
}

.price-value.buy {
    color: #00a59b;
}

.price-value.sell {
    color: #02504f;
}

.currency {
    font-size: 0.6em;
    color: #028078;
    font-weight: 400;
    margin-right: 4px;
}

.loading {
    color: #028078;
    font-size: 1.5em;
    text-align: center;
    padding: 40px;
    -webkit-animation: pulse 1.5s ease-in-out infinite;
            animation: pulse 1.5s ease-in-out infinite;
}

@-webkit-keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.footer-note {
    color: #028078;
    font-size: 0.85em;
    text-align: center;
    margin-top: 20px;
    font-weight: 300;
}

@-webkit-keyframes priceFlash {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes priceFlash {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.price-updated {
    -webkit-animation: priceFlash 0.6s ease;
            animation: priceFlash 0.6s ease;
}

@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 100%;
        height: auto;
    }

    body {
        -webkit-box-pack: start;
        -webkit-justify-content: flex-start;
            -ms-flex-pack: start;
                justify-content: flex-start;
        padding: 40px 0;
    }

    .content-wrapper {
        margin: 0 6px;
        width: 95%;
    }

    .header-bar {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
            -ms-flex-direction: column;
                flex-direction: column;
        -webkit-box-align: center;
        -webkit-align-items: center;
            -ms-flex-align: center;
                align-items: center;
        text-align: center;
        padding: 0 10px;
        margin-bottom: 15px;
    }

    /* Column spacing uses margins rather than `gap`, which older engines ignore. */
    .header-bar > * + * {
        margin-top: 14px;
    }

    .header-text {
        -webkit-box-align: center;
        -webkit-align-items: center;
            -ms-flex-align: center;
                align-items: center;
        text-align: center;
    }

    .header-text > * + * {
        margin-top: 8px;
    }

    .logo-wrapper {
        -webkit-box-ordinal-group: 1;
        -webkit-order: 0;
            -ms-flex-order: 0;
                order: 0;
    }

    .header-date {
        display: block;
        color: #028078;
        font-size: 1em;
        font-weight: 300;
    }

    .update-info {
        font-size: 0.95em;
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
            -ms-flex-direction: column;
                flex-direction: column;
        /* 8px sibling rhythm + the block's own 6px offset. */
        margin-top: 14px;
    }

    .update-info > * + * {
        margin-top: 16px;
    }

    #updateDivider {
        display: none;
    }

    .logo-wrapper img {
        height: 60px;
    }

    .page-title {
        font-size: 1.4em;
        margin-bottom: 4px;
    }

    .price-table-wrapper {
        padding: 10px;
        border-radius: 14px;
    }

    .price-table {
        min-width: 0;
        border-spacing: 0 12px;
    }

    .price-table thead th {
        font-size: 1em;
        padding: 8px 8px;
    }

    .price-table tbody td {
        padding: 10px 8px;
        font-size: 1.6em;
    }

    .price-table tbody tr td:first-child {
        font-size: 1.3em;
    }

    .currency {
        font-size: 0.55em;
    }

    .footer-note {
        font-size: 0.75em;
        margin-top: 15px;
        padding: 0 15px;
    }

    #footerDate {
        display: none;
    }
}
