@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;600&display=swap');

/* top level widget styles */

.ora-dashboard-widget {
    font-family: 'Libre Franklin', sans-serif;
    width: 100%;
    height: 100%;
    max-width: 400px;
    max-height: 180px;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
    padding: 10px;
}

.ora-dashboard-widget .stats {
    display: block;
    text-align: center;
    width: 100%;
}

.ora-dashboard-widget .stats img {
    width: auto;
    max-width: 66px;
    height: auto;
    margin-bottom: 2px;
}

.ora-dashboard-widget .stats img.ontime {
    max-width: 80px;
}

.ora-dashboard-widget .stats .value {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 600;
    font-size: 26.4px;
    line-height: 1;
    padding-top: 8px;
    padding-bottom: 7px;
    white-space: nowrap;
}

.ora-dashboard-widget .stats .heading {
    font-size: 16px;
    line-height: 1.2;
}

/* odometer value alignment */

.ora-dashboard-widget .odometer-value-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-top: 8px;
    padding-bottom: 7px;
    white-space: nowrap;
}

.ora-dashboard-widget .odometer-value-wrapper .odometer-currency-symbol,
.ora-dashboard-widget .odometer-value-wrapper .value,
.ora-dashboard-widget .odometer-value-wrapper .odometer,
.ora-dashboard-widget .odometer-value-wrapper .odometer-inside,
.ora-dashboard-widget .odometer-value-wrapper .odometer-value {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 600;
    font-size: 26.4px;
    line-height: 1;
    white-space: nowrap;
}

.ora-dashboard-widget .odometer-value-wrapper .value {
    padding: 0;
}

.ora-dashboard-widget .odometer-value-wrapper .odometer {
    position: relative;
    top: -0.5px;
}

/* drill down styles */

.ora-dashboard-widget .value-unavailable,
.ora-dashboard-widget .data-unavailable {
    font-weight: 400 !important;
    font-size: 14px !important;
    font-style: italic;
    line-height: 1.25;
    color: #888888;
}

.ora-stats-drilldown {
    font-family: 'Libre Franklin', sans-serif;
    width: 100%;
    max-width: 720px;
    font-size: 16px;
    line-height: 1.4;
}

.ora-stats-drilldown .heading {
    font-weight: 600;
    font-size: 22px;
    padding-bottom: 20px;
    line-height: 1.2;
    box-sizing: border-box;
}

.ora-stats-drilldown .row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #cccccc;
    padding: 8px 0;
}

.ora-stats-drilldown .label {
    flex: 1;
    padding-right: 24px;
}

.ora-stats-drilldown .value,
.ora-stats-drilldown .dollar {
    min-width: 140px;
    text-align: right;
}

.ora-stats-drilldown .ora-drilldown-total-row {
    border-top: 2px solid #888888;
    border-bottom: 2px solid #888888;
}

.ora-stats-drilldown .ora-drilldown-total-row .label,
.ora-stats-drilldown .ora-drilldown-total-row .dollar {
    font-weight: bold;
}

.ora-chart-wrapper {
    margin-right: auto;
    margin-left: auto;
    width: 100%;
    max-width: 520px;
}

.ora-chart-wrapper canvas {
    width: 100%;
    max-width: 500px;
}

.show-data-unavailable {
    display: block !important;
}

.hide-data-unavailable {
    display: none;
}

/* Research expenditures modal */

.ora-research-expenditures-modal-heading {
    font-family: 'Libre Franklin', sans-serif !important;
    font-size: clamp(16px, 3vw, 22px) !important;
    line-height: 1.1 !important;
}

.ora-ytd-research-expenditures-chart-drilldown {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ora-ytd-research-expenditures-chart-drilldown canvas {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

.ora-ytd-research-expenditures-chart-drilldown .heading {
    padding-bottom: 8px;
}

.ora-ytd-research-expenditures-chart-drilldown .ora-chart-wrapper {
    width: 100%;
    max-width: min(100%, 460px);
    margin-right: auto;
    margin-left: auto;
    margin-top: -18px;
    box-sizing: border-box;
}

.ora-research-expenditures-table {
    font-family: 'Libre Franklin', sans-serif;
    display: block;
    width: 100%;
    font-size: clamp(5px, 1.25vw, 16px);
    line-height: 1.25;
}

.ora-research-expenditures-table .row {
    display: flex;
    align-items: center;
    border-top: 1px solid #aaaaaa;
    padding: 8px 0;
     gap: 8px;
}

.ora-research-expenditures-table .c1,
.ora-research-expenditures-table .c2,
.ora-research-expenditures-table .c3,
.ora-research-expenditures-table .c4,
.ora-research-expenditures-table .c5 {
    box-sizing: border-box;
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
    min-width: 0;
}

.ora-research-expenditures-table .c1 {
    width: 22%;
    text-align: left;
}

.ora-research-expenditures-table .c2,
.ora-research-expenditures-table .c3,
.ora-research-expenditures-table .c4 {
    width: 20%;
    text-align: right;
}

.ora-research-expenditures-table .c2,
.ora-research-expenditures-table .c3,
.ora-research-expenditures-table .c4,
.ora-research-expenditures-table .c5 {
    white-space: nowrap;
}

.ora-research-expenditures-table .c5 {
    width: 18%;
    text-align: right;
}

.ora-research-expenditures-table .ora-table-header-row {
    border-top: none;
    border-bottom: 2px solid #888888;
}

.ora-research-expenditures-table .ora-table-total-row {
    border-top: 2px solid #888888;
    border-bottom: 2px solid #888888;
    font-weight: bold;
    font-size: 15px;
}

.ora-research-expenditures-table .ora-table-total-row,
.ora-research-expenditures-table .ora-table-total-row .c2,
.ora-research-expenditures-table .ora-table-total-row .c3,
.ora-research-expenditures-table .ora-table-total-row .c4,
.ora-research-expenditures-table .ora-table-total-row .c5 {
    font-size: clamp(5px, 1.15vw, 15px);
}

/* Chart-specific styles */

.ora-on-time-proposals-chart-heading {
    font-size: 22px;
}

.ora-on-time-proposals-chart-wrapper {
    width: 100%;
    max-width: 620px;
}

.ora-ytd-outgoing-subawards-processed-chart-heading {
    font-size: 22px;
}

.ora-ytd-outgoing-subawards-processed-chart-wrapper {
    width: 100%;
    max-width: 620px;
}

/* Subaward drilldown table */

.ora-subaward-data {
    font-family: 'Libre Franklin', sans-serif;
    display: block;
    width: 100%;
    font-size: 16px;
    line-height: 1.4;
}

.ora-subaward-data .heading {
    text-align: left;
    padding-bottom: 14px;
    font-size: 22px;
    font-weight: 600;
}

.ora-subaward-data .row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #cccccc;
    padding: 8px 0;
}

.ora-subaward-data .c1 {
    width: 60%;
    text-align: left;
    font-weight: 600;
}

.ora-subaward-data .c2 {
    width: 38%;
    text-align: right;
}

.ora-subaward-data .ora-table-header-row {
    border-bottom: 2px solid #888888;
}

.ora-subaward-data .ora-subaward-other-row {
    border-bottom: 1.5px solid #888888;
}

.ora-subaward-data .ora-table-total-row {
    border-top: 1px solid #888888;
    border-bottom: 2px solid #888888;
    font-weight: bold;
}

.ora-subaward-data .footer-txt {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 12px;
    padding-top: 16px;
}

/* large tablet / small desktop */

@media (min-width: 945px) and (max-width: 1065px) {
    .ora-dashboard-widget .stats img {
        max-width: 62px;
    }

    .ora-dashboard-widget .stats img.ontime {
        max-width: 76px;
    }

    .ora-dashboard-widget .stats .value,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-currency-symbol,
    .ora-dashboard-widget .odometer-value-wrapper .value,
    .ora-dashboard-widget .odometer-value-wrapper .odometer,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-inside,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-value {
        font-size: 24px;
    }

    .ora-dashboard-widget .stats .heading {
        font-size: 14px;
    }
}

/* small tablet */

@media (min-width: 765px) and (max-width: 944px) {
    .ora-dashboard-widget {
        padding-left: 6px;
        padding-right: 6px;
    }

    .ora-dashboard-widget .stats img {
        max-width: 54px;
    }

    .ora-dashboard-widget .stats img.ontime {
        max-width: 66px;
    }

    .ora-dashboard-widget .stats .value,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-currency-symbol,
    .ora-dashboard-widget .odometer-value-wrapper .value,
    .ora-dashboard-widget .odometer-value-wrapper .odometer,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-inside,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-value {
        font-size: 21px;
    }

    .ora-dashboard-widget .stats .heading {
        font-size: 13px;
        line-height: 1.15;
    }
}

/* mobile/small widths: widgets wrap, restore normal sizing */

@media (max-width: 764px) {
    .ora-dashboard-widget .stats img {
        max-width: 66px;
    }

    .ora-dashboard-widget .stats img.ontime {
        max-width: 80px;
    }

    .ora-dashboard-widget .stats .value,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-currency-symbol,
    .ora-dashboard-widget .odometer-value-wrapper .value,
    .ora-dashboard-widget .odometer-value-wrapper .odometer,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-inside,
    .ora-dashboard-widget .odometer-value-wrapper .odometer-value {
        font-size: 26.4px;
    }

    .ora-dashboard-widget .stats .heading {
        font-size: 16px;
    }
}

/* small screens: research expenditures table */

@media (max-width: 480px) {
    .ora-research-expenditures-table {
        font-size: clamp(5px, 1.7vw, 10px);
        line-height: 1.15;
        width: 100%;
        max-width: 100%;
    }

    .ora-research-expenditures-table .row {
        gap: 3px;
        padding: 5px 0;
    }

    .ora-research-expenditures-table .c1 {
        width: 21%;
    }

    .ora-research-expenditures-table .c2,
    .ora-research-expenditures-table .c3,
    .ora-research-expenditures-table .c4 {
        width: 20%;
    }

    .ora-research-expenditures-table .c5 {
        width: 19%;
    }

    .ora-research-expenditures-table .ora-table-total-row,
    .ora-research-expenditures-table .ora-table-total-row .c1,
    .ora-research-expenditures-table .ora-table-total-row .c2,
    .ora-research-expenditures-table .ora-table-total-row .c3,
    .ora-research-expenditures-table .ora-table-total-row .c4,
    .ora-research-expenditures-table .ora-table-total-row .c5 {
        font-size: clamp(5px, 1.7vw, 9.5px);
    }
}

/* short viewport: shrink research expenditures modal content */

@media (max-height: 660px) {
    .ora-research-expenditures-modal-heading {
        font-size: clamp(14px, 4vh, 20px) !important;
        line-height: 1.05 !important;
    }

    .ora-ytd-research-expenditures-chart-drilldown .heading {
        padding-bottom: 4px;
    }

    .ora-ytd-research-expenditures-chart-drilldown .ora-chart-wrapper {
        width: 100%;
        max-width: 300px;
        height: 230px;
        margin-top: -8px;
        margin-right: auto;
        margin-left: auto;
    }

    .ora-ytd-research-expenditures-chart-drilldown canvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 230px !important;
    }

    .ora-research-expenditures-table {
        font-size: clamp(5px, 1.05vw, 10px);
        line-height: 1.1;
    }

    .ora-research-expenditures-table .row {
        padding: 4px 0;
        gap: 4px;
    }

    .ora-research-expenditures-table .ora-table-total-row,
    .ora-research-expenditures-table .ora-table-total-row .c1,
    .ora-research-expenditures-table .ora-table-total-row .c2,
    .ora-research-expenditures-table .ora-table-total-row .c3,
    .ora-research-expenditures-table .ora-table-total-row .c4,
    .ora-research-expenditures-table .ora-table-total-row .c5 {
        font-size: clamp(5px, 1vw, 9.5px);
    }
}

@media (max-height: 440px) {
    .ora-research-expenditures-modal-heading {
        font-size: clamp(13px, 4vh, 18px) !important;
    }

    .ora-ytd-research-expenditures-chart-drilldown .ora-chart-wrapper {
        max-width: 250px;
        height: 195px;
        margin-top: -4px;
    }

    .ora-ytd-research-expenditures-chart-drilldown canvas {
        max-height: 195px !important;
    }

    .ora-research-expenditures-table {
        font-size: clamp(5px, 0.95vw, 9px);
        line-height: 1.05;
    }

    .ora-research-expenditures-table .row {
        padding: 3px 0;
        gap: 3px;
    }

    .ora-research-expenditures-table .ora-table-total-row,
    .ora-research-expenditures-table .ora-table-total-row .c1,
    .ora-research-expenditures-table .ora-table-total-row .c2,
    .ora-research-expenditures-table .ora-table-total-row .c3,
    .ora-research-expenditures-table .ora-table-total-row .c4,
    .ora-research-expenditures-table .ora-table-total-row .c5 {
        font-size: clamp(5px, 0.9vw, 8.5px);
    }
}
