/* =========================================================
   AIRSWAP HISTORY PAGE
   ========================================================= */

.history-page {
    min-height: calc(100vh - 70px);

    padding: 45px 0 70px;

    background:
        radial-gradient(
            circle at 0% 10%,
            rgba(32, 165, 72, 0.07),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #fbfdff 0%,
            #f7faf8 100%
        );

    /* font-family:
        "Livvic",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif; */
}


/* =========================================================
   CONTAINER
   ========================================================= */

.history-container {
    width: min(1080px, calc(100% - 40px));

    margin: 0 auto;
}


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

.history-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;

    margin-bottom: 30px;
}

.history-title {
    text-align: left;
}

.history-eyebrow {
    display: block;

    margin-bottom: 7px;

    color: #20a548;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;
}

.history-title h1 {
    margin: 0;

    color: #171878;

    font-size: 40px;

    font-weight: 700;

    line-height: 1.1;

    letter-spacing: -1.5px;
}

.history-title p {
    max-width: 500px;

    margin: 10px 0 0;

    color: #6f7b8d;

    font-size: 14px;

    line-height: 1.6;
}



/* =========================================================
   SUMMARY
   ========================================================= */

.history-summary {
    min-width: 220px;

    display: flex;

    align-items: center;

    gap: 13px;

    padding: 18px 20px;

    border: 1px solid #dff2e6;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #eafff1,
            #f4fff8
        );

    box-shadow:
        0 8px 25px rgba(32, 165, 72, 0.05);
}

.summary-icon {
    width: 45px;
    height: 45px;

    display: flex;

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

    flex-shrink: 0;

    border-radius: 13px;

    background: #d5f6e1;

    color: #20a548;

    font-size: 20px;
}

.history-summary span {
    display: block;

    color: #65738a;

    font-size: 13px;
}

.history-summary strong {
    display: block;

    margin-top: 2px;

    color: #171878;

    font-size: 25px;

    line-height: 1.1;
}

.history-summary small {
    color: #7d8999;

    font-size: 10px;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.history-toolbar {
    min-height: 54px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 15px;

    padding: 0 17px;

    border: 1px solid #e7ebf0;

    border-radius: 14px;

    background: rgba(255,255,255,.8);
}

.toolbar-title {
    display: flex;

    align-items: center;

    gap: 9px;

    color: #171878;

    font-size: 13px;

    font-weight: 600;
}

.toolbar-title i {
    color: #20a548;
}

.toolbar-count {
    color: #7b8798;

    font-size: 11px;
}


/* =========================================================
   TRANSACTION GRID
   ========================================================= */

.transaction-grid {
    display: grid;

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

    gap: 14px;
}


/* =========================================================
   TRANSACTION CARD
   ========================================================= */

.tx-card {
    position: relative;

    overflow: hidden;

    padding: 18px 18px 0;

    border: 1px solid #e7ebf0;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 8px 28px rgba(22, 35, 70, 0.055);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.tx-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 14px 35px rgba(22, 35, 70, 0.09);
}


/* Small status indicator on left */

.tx-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 18px;
    bottom: 18px;

    width: 3px;

    border-radius: 0 5px 5px 0;
}

.tx-success::before {
    background: #20a548;
}

.tx-pending::before {
    background: #f5a623;
}

.tx-failed::before {
    background: #e84848;
}


/* =========================================================
   MAIN TRANSACTION
   ========================================================= */

.tx-main {
    min-height: 108px;

    display: grid;

    grid-template-columns:
        48px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 12px;
}


/* =========================================================
   ICON
   ========================================================= */

.tx-icon {
    width: 48px;
    height: 48px;

    display: flex;

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

    border-radius: 14px;

    font-size: 19px;
}

.convert-icon {
    color: #147be8;

    background: #e8f3ff;
}

.purchase-icon {
    color: #20a548;

    background: #e3f8eb;
}


/* =========================================================
   DETAILS
   ========================================================= */

.tx-details {
    min-width: 0;
}

.tx-title {
    display: block;

    overflow: hidden;

    color: #171878;

    font-size: 14px;

    font-weight: 700;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.purchase-title {
    color: #20953e;
}

.convert-title {
    color: #171878;
}

.tx-subtitle {
    display: block;

    margin-top: 3px;

    color: #788396;

    font-size: 11px;
}

.tx-date {
    display: flex;

    align-items: center;

    gap: 5px;

    margin-top: 10px;

    color: #7b8796;

    font-size: 10px;
}

.tx-date i {
    color: #8a96a7;
}


/* =========================================================
   RIGHT SIDE
   ========================================================= */

.tx-right {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 8px;
}

.tx-amount {
    color: #34373d;

    font-size: 15px;

    font-weight: 700;

    white-space: nowrap;
}

.tx-status {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 5px 10px;

    border-radius: 30px;

    font-size: 9px;

    font-weight: 700;

    white-space: nowrap;
}

.tx-status i {
    font-size: 8px;
}


/* =========================================================
   STATUS COLORS
   ========================================================= */

.status-success {
    color: #15965a;

    background: #e4f8ed;
}

.status-pending {
    color: #ed9200;

    background: #fff3df;
}

.status-failed {
    color: #df3838;

    background: #ffe9e9;
}


/* =========================================================
   BOTTOM
   ========================================================= */

.tx-bottom {
    min-height: 43px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    border-top: 1px dashed #dfe4ea;
}

.tx-reference,
.tx-phone {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 2px;
}

.tx-phone {
    text-align: right;
}

.tx-label {
    color: #9aa3af;

    font-size: 1px;
}

.tx-meta {
    overflow: hidden;

    color: black;

    font-size: 13px;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.history-pagination {
    display: flex;

    justify-content: flex-start;

    margin-top: 22px;
}


/*
   jw-pagination generates its own markup.
   These rules style the common Bootstrap-style output.
*/

.history-pagination ul {
    display: flex;

    align-items: center;

    margin: 0;

    padding: 0;

    list-style: none;

    border-radius: 9px;

    overflow: hidden;

    border: 1px solid #dce3ea;
}

.history-pagination li {
    margin: 0 !important;
}

.history-pagination li a,
.history-pagination li span {
    min-width: 38px;
    height: 38px;

    display: flex;

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

    padding: 0 10px;

    border: 0 !important;

    border-right: 1px solid #dce3ea !important;

    background: white;

    color: #1674e8;

    font-size: 11px;

    text-decoration: none;

    cursor: pointer;
}

.history-pagination li:last-child a,
.history-pagination li:last-child span {
    border-right: 0 !important;
}

.history-pagination li.active a,
.history-pagination li.active span {
    color: white !important;

    background: #20a548 !important;
}

.history-pagination li.disabled a,
.history-pagination li.disabled span {
    color: #9da6b2 !important;

    background: #f1f3f5 !important;

    cursor: not-allowed;
}




/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 850px) {

    .history-header {
        align-items: flex-start;
    }

    .history-title h1 {
        font-size: 34px;
    }

    .history-summary {
        min-width: 200px;
    }

    .transaction-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .history-page {
        min-height: calc(100vh - 64px);

        padding: 25px 0 45px;
    }

    .history-container {
        width: calc(100% - 20px);
    }


    /* Header */

    .history-header {
        display: block;

        margin-bottom: 20px;
    }

    .history-eyebrow {
        font-size: 9px;
    }

    .history-title h1 {
        font-size: 29px;

        letter-spacing: -1px;
    }

    .history-title p {
        margin-top: 7px;

        font-size: 12px;

        line-height: 1.5;
    }


    /* Summary */

    .history-summary {
        width: 100%;

        min-height: 82px;

        margin-top: 16px;

        padding: 12px 15px;
    }

    .summary-icon {
        width: 40px;
        height: 40px;

        font-size: 17px;
    }

    .history-summary span {
        font-size: 10px;
    }

    .history-summary strong {
        font-size: 21px;
    }

    .history-summary small {
        font-size: 9px;
    }


    /* Toolbar */

    .history-toolbar {
        min-height: 46px;

        margin-bottom: 12px;

        padding: 0 13px;
    }

    .toolbar-title {
        font-size: 11px;
    }

    .toolbar-count {
        font-size: 9px;
    }


    /* Cards */

    .transaction-grid {
        display: flex;

        flex-direction: column;

        gap: 11px;
    }

    .tx-card {
        padding: 14px 13px 0;

        border-radius: 16px;
    }

    .tx-card::before {
        top: 15px;
        bottom: 15px;
    }

    .tx-main {
        min-height: 99px;

        grid-template-columns:
            43px
            minmax(0, 1fr)
            auto;

        gap: 10px;
    }

    .tx-icon {
        width: 43px;
        height: 43px;

        border-radius: 12px;

        font-size: 17px;
    }

    .tx-title {
        font-size: 13px;
    }

    .tx-subtitle {
        font-size: 10px;
    }

    .tx-date {
        margin-top: 8px;

        font-size: 9px;
    }

    .tx-amount {
        font-size: 13px;
    }

    .tx-status {
        padding: 5px 8px;

        font-size: 8px;
    }

    .tx-bottom {
        min-height: 39px;
    }

    .tx-label {
        font-size: 11px;
    }

    .tx-meta {
        max-width: 150px;

        font-size: 11px;
    }


    /* Pagination */

    .history-pagination {
        justify-content: center;

        margin-top: 18px;

        overflow-x: auto;

        padding-bottom: 3px;
    }

    .history-pagination ul {
        flex-shrink: 0;
    }

    .history-pagination li a,
    .history-pagination li span {
        min-width: 34px;
        height: 34px;

        font-size: 10px;
    }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .history-container {
        width: calc(100% - 14px);
    }

    .history-title h1 {
        font-size: 26px;
    }

    .tx-main {
        grid-template-columns:
            39px
            minmax(0, 1fr)
            auto;

        gap: 8px;
    }

    .tx-icon {
        width: 39px;
        height: 39px;

        font-size: 15px;
    }

    .tx-title {
        font-size: 12px;
    }

    .tx-subtitle {
        font-size: 9px;
    }

    .tx-date {
        font-size: 8px;
    }

    .tx-amount {
        font-size: 11px;
    }

    .tx-status {
        padding: 4px 7px;

        font-size: 7px;
    }

    .tx-meta {
        max-width: 120px;

        font-size: 8px;
    }

}