﻿/* Demo backdrop */
:where(#rateHistoryModal) .page-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(28, 40, 55, .45);
    backdrop-filter: blur(5px);
}

/* Modal */
:where(#rateHistoryModal) .rate-modal {
    position: relative;
    z-index: 10;
    width: min(1100px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(15, 30, 50, .20), 0 8px 30px rgba(15, 30, 50, .08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
:where(#rateHistoryModal) .modal-header-custom {
    padding: 28px 32px 20px;
    border: 0;
}

:where(#rateHistoryModal) .history-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--light-green);
    color: var(--primary-green);
    font-size: 27px;
}

:where(#rateHistoryModal) .modal-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.6px;
    color: var(--text-dark);
}

:where(#rateHistoryModal) .modal-subtitle {
    margin-top: 3px;
    font-size: 16px;
    color: #718198;
}

:where(#rateHistoryModal) .btn-close-custom {
    border: 0;
    background: transparent;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #68788d;
    font-size: 25px;
    border-radius: 10px;
    transition: .2s;
}

    :where(#rateHistoryModal) .btn-close-custom:hover {
        background: #f3f5f7;
        color: #26364d;
    }

/* Date summary */
:where(#rateHistoryModal) .date-summary {
    margin: 0 10px 22px;
    padding: 17px 20px;
    background: var(--bg-soft);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

:where(#rateHistoryModal) .date-icon {
    font-size: 25px;
    color: var(--text-dark);
}

:where(#rateHistoryModal) .date-title {
    color: var(--text-dark);
    font-size: 17px;
    font-weight: 600;
}

:where(#rateHistoryModal) .date-subtitle {
    margin-top: 2px;
    font-size: 14px;
    color: var(--text-muted);
}

:where(#rateHistoryModal) .version-badge {
    padding: 9px 15px;
    border-radius: 10px;
    color: #15765f;
    background: #e5f8f0;
    font-size: 14px;
    font-weight: 600;
}

/* Table */
:where(#rateHistoryModal) .history-container {
    padding: 0 32px;
    overflow-y: auto;
}

:where(#rateHistoryModal) .history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    :where(#rateHistoryModal) .history-table thead th {
        padding: 8px 18px 13px;
        color: #8997aa;
        font-size: 13px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: .4px;
        border: 0;
    }

    :where(#rateHistoryModal) .history-table tbody tr {
        transition: background .2s;
    }

    :where(#rateHistoryModal) .history-table tbody td {
        padding: 17px 18px;
        color: var(--text-dark);
        border-top: 1px solid var(--border);
        vertical-align: middle;
    }

    :where(#rateHistoryModal) .history-table tbody tr:hover td {
        background: #fafcfd;
    }

    /* Current row */
    :where(#rateHistoryModal) .history-table tbody tr.current-row td {
        background: #effaf6;
        border-top-color: transparent;
    }

        :where(#rateHistoryModal) .history-table tbody tr.current-row td:first-child {
            border-left: 4px solid #1bb47d;
            border-radius: 10px 0 0 10px;
        }

        :where(#rateHistoryModal) .history-table tbody tr.current-row td:last-child {
            border-radius: 0 10px 10px 0;
        }

:where(#rateHistoryModal) .history-id {
    font-size: 18px;
    font-weight: 600;
}

/* Status */
:where(#rateHistoryModal) .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

    :where(#rateHistoryModal) .status-badge.current {
        color: #15825f;
        background: #d9f5e9;
    }

    :where(#rateHistoryModal) .status-badge.previous {
        color: #62728a;
        background: #eef2f6;
    }

:where(#rateHistoryModal) .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Date */
:where(#rateHistoryModal) .updated-date {
    font-size: 15px;
    line-height: 1.4;
    color: #263750;
}

:where(#rateHistoryModal) .updated-time {
    color: #91a0b3;
}

/* User */
:where(#rateHistoryModal) .user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

:where(#rateHistoryModal) .user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf2f7;
    color: #7b8ba1;
    font-size: 19px;
}

:where(#rateHistoryModal) .user-name {
    color: #263750;
    font-size: 15px;
}

:where(#rateHistoryModal) .user-company {
    color: #94a1b2;
    font-size: 13px;
    margin-top: 2px;
}

/* Price */
:where(#rateHistoryModal) .price {
    text-align: right;
    font-size: 18px;
    font-weight: 700;
    color: #14213d;
    white-space: nowrap;
}

/* Footer */
:where(#rateHistoryModal) .modal-footer-custom {
    margin-top: 10px;
    padding: 18px 32px;
    border-top: 1px solid #eef1f4;
    display: flex;
    justify-content: flex-end;
}

:where(#rateHistoryModal) .close-button {
    min-width: 110px;
    padding: 9px 20px;
    border: 1px solid #d6dfe8;
    border-radius: 10px;
    background: white;
    color: #263750;
    font-size: 15px;
    font-weight: 500;
    transition: .2s;
}

    :where(#rateHistoryModal) .close-button:hover {
        background: #f6f8fa;
        border-color: #c5d0dc;
    }

/* Responsive */
@media (max-width: 768px) {

    :where(#rateHistoryModal) .rate-modal {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }

    :where(#rateHistoryModal) .modal-header-custom {
        padding: 22px 20px 16px;
    }

    :where(#rateHistoryModal) .modal-title {
        font-size: 24px;
    }

    :where(#rateHistoryModal) .modal-subtitle {
        font-size: 14px;
    }

    :where(#rateHistoryModal) .history-icon {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    :where(#rateHistoryModal) .date-summary {
        margin-left: 20px;
        margin-right: 20px;
    }

    :where(#rateHistoryModal) .history-container {
        padding: 0 20px;
    }

    :where(#rateHistoryModal) .history-table {
        min-width: 750px;
    }

    :where(#rateHistoryModal) .history-container {
        overflow-x: auto;
    }

    :where(#rateHistoryModal) .modal-footer-custom {
        padding: 15px 20px;
    }
}
