/*
 * Yatırım theme (from Cinevarium's): the design tokens, and how Bootstrap's components and DevExtreme's widgets look with them.
 * Bootstrap is the stock 5.3 build (libs/bootstrap); the brand is set here through its CSS variables, so the stock
 * file stays untouched. Loaded right after Bootstrap and the icons; layout.css, DevExtreme and site.css follow.
 */

/* Poppins is served by the site itself (OFL 1.1, libs/poppins): no request leaves for a font service.
   latin-ext carries the Turkish letters; the browser fetches a file only when the page has its characters. */
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../libs/poppins/files/poppins-latin-400-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../libs/poppins/files/poppins-latin-ext-400-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(../libs/poppins/files/poppins-latin-500-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(../libs/poppins/files/poppins-latin-ext-500-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../libs/poppins/files/poppins-latin-600-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(../libs/poppins/files/poppins-latin-ext-600-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../libs/poppins/files/poppins-latin-700-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(../libs/poppins/files/poppins-latin-ext-700-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================
   TOKENS
   ============================================ */
:root {
    --app-primary: #173F5F;
    --app-primary-rgb: 23, 63, 95;
    --app-primary-dark: #102F48;
    --app-primary-light: #4C7593;
    --app-primary-subtle: #E7EEF4;
    --app-success: #2F7049;
    --app-danger: #C24545;

    --app-bg: #F4F6F9;
    --app-surface: #fff;
    --app-hover: #F1F4F8;
    --app-border: #E3E7ED;
    --app-input-bg: #F7F9FB;
    --app-input-border: #D7DEE7;
    --app-shadow: 0 1px 2px rgba(18, 38, 63, .06), 0 1px 4px rgba(18, 38, 63, .04);
    --app-shadow-raised: 0 .5rem 1.5rem rgba(18, 38, 63, .12);
    --app-text: #495057;

    /* Type scale of the app pages: 13px secondary text, 14px body, 16px section titles, 24px page titles.
       Weight and colour carry the hierarchy, so no text on these pages goes below 13px (count badges are 12px). */
    --type-meta: .8125rem;
    --type-body: .875rem;
    --type-section: 1rem;
    --type-title: 1.5rem;
    --ink: #1E2A3A;
    --muted: #74788d;

    /* Bootstrap. The body background stays white here: cards, menus, modals and inputs take theirs from it. */
    --bs-font-sans-serif: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-size: .8125rem;
    --bs-body-color: #495057;
    --bs-body-color-rgb: 73, 80, 87;
    --bs-emphasis-color: #1E2A3A;
    --bs-emphasis-color-rgb: 30, 42, 58;
    --bs-secondary-color: #74788d;
    --bs-border-color: #E3E7ED;
    --bs-link-color: #173F5F;
    --bs-link-color-rgb: 23, 63, 95;
    --bs-link-hover-color: #102F48;
    --bs-link-hover-color-rgb: 16, 47, 72;
    --bs-focus-ring-color: rgba(23, 63, 95, .25);

    --bs-primary: #173F5F;
    --bs-primary-rgb: 23, 63, 95;
    --bs-primary-text-emphasis: #102F48;
    --bs-primary-bg-subtle: #E7EEF4;
    --bs-primary-border-subtle: #BCD0DE;
    --bs-secondary: #74788d;
    --bs-secondary-rgb: 116, 120, 141;
    --bs-success: #3D8B5F;
    --bs-success-rgb: 61, 139, 95;
    --bs-danger: #C24545;
    --bs-danger-rgb: 194, 69, 69;
    --bs-warning: #D4A84B;
    --bs-warning-rgb: 212, 168, 75;
    --bs-info: #5B8BA0;
    --bs-info-rgb: 91, 139, 160;
}

body {
    background-color: var(--app-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

h1, .h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.625rem; }
h3, .h3 { font-size: 1.375rem; }
h4, .h4 { font-size: 1.21875rem; }
h5, .h5 { font-size: 1rem; }
h6, .h6 { font-size: .8125rem; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    --bs-btn-padding-x: .85rem;
    --bs-btn-padding-y: .35rem;
    --bs-btn-font-size: .8125rem;
    --bs-btn-font-weight: 500;
}

/* After .btn above, which would otherwise win over Bootstrap's own sizes. */
.btn-sm,
.btn-group-sm > .btn {
    --bs-btn-padding-x: .6rem;
    --bs-btn-padding-y: .2rem;
    --bs-btn-font-size: .8125rem;
}

.btn-lg,
.btn-group-lg > .btn {
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-padding-y: .5rem;
    --bs-btn-font-size: .9375rem;
}

/* Icon and text sit on one centre line (the icon font's baseline is lower than the text's). */
.btn:has(> i.bx) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:has(> i.bx) > i.bx {
    line-height: 1;
}

.btn-primary {
    --bs-btn-bg: #173F5F;
    --bs-btn-border-color: #173F5F;
    --bs-btn-hover-bg: #102F48;
    --bs-btn-hover-border-color: #102F48;
    --bs-btn-focus-shadow-rgb: 23, 63, 95;
    --bs-btn-active-bg: #102F48;
    --bs-btn-active-border-color: #102F48;
    --bs-btn-disabled-bg: #4C7593;
    --bs-btn-disabled-border-color: #4C7593;
}

.btn-outline-primary {
    --bs-btn-color: #173F5F;
    --bs-btn-border-color: #173F5F;
    --bs-btn-hover-bg: #173F5F;
    --bs-btn-hover-border-color: #173F5F;
    --bs-btn-focus-shadow-rgb: 23, 63, 95;
    --bs-btn-active-bg: #173F5F;
    --bs-btn-active-border-color: #173F5F;
    --bs-btn-disabled-color: #4C7593;
    --bs-btn-disabled-border-color: #4C7593;
}

.btn-outline-secondary {
    --bs-btn-color: #5F6477;
    --bs-btn-border-color: #C6CBD4;
    --bs-btn-hover-color: #1E2A3A;
    --bs-btn-hover-bg: #EEF1F5;
    --bs-btn-hover-border-color: #AEB5C0;
    --bs-btn-focus-shadow-rgb: 116, 120, 141;
    --bs-btn-active-color: #1E2A3A;
    --bs-btn-active-bg: #E2E7EE;
    --bs-btn-active-border-color: #AEB5C0;
    --bs-btn-disabled-color: #9AA0AE;
    --bs-btn-disabled-border-color: #D7DBE2;
}

.btn-danger {
    --bs-btn-bg: #C24545;
    --bs-btn-border-color: #C24545;
    --bs-btn-hover-bg: #A93A3A;
    --bs-btn-hover-border-color: #A93A3A;
    --bs-btn-focus-shadow-rgb: 194, 69, 69;
    --bs-btn-active-bg: #A93A3A;
    --bs-btn-active-border-color: #A93A3A;
    --bs-btn-disabled-bg: #D98888;
    --bs-btn-disabled-border-color: #D98888;
}

.btn-outline-danger {
    --bs-btn-color: #C24545;
    --bs-btn-border-color: #E0A3A3;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #C24545;
    --bs-btn-hover-border-color: #C24545;
    --bs-btn-focus-shadow-rgb: 194, 69, 69;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #A93A3A;
    --bs-btn-active-border-color: #A93A3A;
    --bs-btn-disabled-color: #D98888;
    --bs-btn-disabled-border-color: #E8C1C1;
}

.btn-light {
    --bs-btn-color: #1E2A3A;
    --bs-btn-bg: #EEF1F5;
    --bs-btn-border-color: #EEF1F5;
    --bs-btn-hover-color: #1E2A3A;
    --bs-btn-hover-bg: #E2E7EE;
    --bs-btn-hover-border-color: #E2E7EE;
    --bs-btn-active-color: #1E2A3A;
    --bs-btn-active-bg: #D8DEE7;
    --bs-btn-active-border-color: #D8DEE7;
}

.btn-link {
    --bs-btn-font-weight: 500;
    text-decoration: none;
}

/* ============================================
   FORMS
   ============================================ */
.form-control,
.form-select {
    padding-top: .4rem;
    padding-bottom: .4rem;
    font-size: .8125rem;
    border-color: var(--app-input-border);
    background-color: var(--app-input-bg);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-primary-light);
    background-color: #fff;
    box-shadow: 0 0 0 .2rem rgba(23, 63, 95, .15);
}

.form-control::placeholder {
    color: #979DAC;
}

.form-control-sm,
.form-select-sm {
    padding-top: .25rem;
    padding-bottom: .25rem;
    font-size: .8125rem;
}

.input-group-text {
    padding-top: .4rem;
    padding-bottom: .4rem;
    font-size: .8125rem;
    color: var(--muted);
    border-color: var(--app-input-border);
    background-color: #EEF1F5;
}

.form-label {
    margin-bottom: .35rem;
    font-weight: 500;
    color: var(--ink);
}

.form-check-input {
    border-color: #B9C1CC;
}

.form-check-input:checked {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.form-check-input:focus {
    border-color: var(--app-primary-light);
    box-shadow: 0 0 0 .2rem rgba(23, 63, 95, .2);
}

.form-switch .form-check-input:focus:not(:checked) {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%234C7593'/%3e%3c/svg%3e");
}

/* ============================================
   SURFACES
   ============================================ */
.card {
    --bs-card-border-width: 0;
    --bs-card-border-radius: .5rem;
    --bs-card-inner-border-radius: .5rem;
    --bs-card-spacer-y: 1rem;
    --bs-card-spacer-x: 1.25rem;
    --bs-card-cap-padding-y: .75rem;
    --bs-card-cap-padding-x: 1.25rem;
    --bs-card-cap-bg: transparent;
    margin-bottom: 1rem;
    box-shadow: var(--app-shadow);
}

@media (max-width: 575.98px) {
    .card {
        --bs-card-spacer-x: 1rem;
        --bs-card-cap-padding-x: 1rem;
    }
}

.card-header {
    border-bottom: 1px solid var(--app-border);
}

.card-footer {
    border-top: 1px solid var(--app-border);
}

.card-title {
    color: var(--ink);
}

.table {
    --bs-table-border-color: var(--app-border);
}

.table > :not(caption) > * > * {
    padding: .6rem .75rem;
}

.table-sm > :not(caption) > * > * {
    padding: .35rem .5rem;
}

.table > thead th {
    font-weight: 600;
    color: var(--muted);
}

.dropdown-menu {
    --bs-dropdown-font-size: .875rem;
    --bs-dropdown-color: var(--app-text);
    --bs-dropdown-border-color: var(--app-border);
    --bs-dropdown-border-radius: .5rem;
    --bs-dropdown-padding-y: .4rem;
    --bs-dropdown-item-padding-x: 1rem;
    --bs-dropdown-item-padding-y: .45rem;
    --bs-dropdown-link-color: var(--app-text);
    --bs-dropdown-link-hover-color: var(--ink);
    --bs-dropdown-link-hover-bg: var(--app-hover);
    --bs-dropdown-link-active-color: var(--app-primary);
    --bs-dropdown-link-active-bg: var(--app-primary-subtle);
    box-shadow: var(--app-shadow-raised);
}

.dropdown-item.active,
.dropdown-item:active {
    font-weight: 600;
}

.modal {
    --bs-modal-border-color: transparent;
    --bs-modal-border-radius: .6rem;
    --bs-modal-inner-border-radius: .6rem;
    --bs-modal-header-border-color: var(--app-border);
    --bs-modal-footer-border-color: var(--app-border);
    --bs-modal-box-shadow: 0 1rem 3rem rgba(18, 38, 63, .2);
}

.modal-content {
    box-shadow: var(--bs-modal-box-shadow);
}

.modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.alert {
    --bs-alert-padding-x: 1rem;
    --bs-alert-padding-y: .75rem;
    --bs-alert-border-radius: .5rem;
}

.badge {
    --bs-badge-font-weight: 600;
}

/* The count next to a list or section name. */
.badge-count {
    background-color: var(--app-primary) !important;
    color: #fff;
}

.badge-count-muted {
    background-color: #e9ecef !important;
    color: #6c757d;
}

.list-group {
    --bs-list-group-border-color: var(--app-border);
    --bs-list-group-action-hover-bg: var(--app-hover);
    --bs-list-group-action-active-bg: var(--app-primary-subtle);
    --bs-list-group-active-bg: var(--app-primary);
    --bs-list-group-active-border-color: var(--app-primary);
}

.nav {
    --bs-nav-link-font-size: .875rem;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--app-primary);
}

.progress {
    --bs-progress-bar-bg: var(--app-primary);
}

/* ============================================
   DEVEXTREME
   The brand colour instead of the theme's blue, on the widgets the site uses: data grid, tag box, autocomplete,
   number box, slider, notify.
   ============================================ */
.dx-texteditor.dx-editor-outlined {
    border-color: var(--app-input-border);
    background-color: var(--app-input-bg);
}

.dx-texteditor.dx-state-focused.dx-editor-outlined,
.dx-texteditor.dx-state-active.dx-editor-outlined {
    border-color: var(--app-primary-light);
    background-color: #fff;
}

.dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-state-focused,
.dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item.dx-state-active {
    background-color: var(--app-primary);
    color: #fff;
}

.dx-list-item-selected {
    background-color: rgba(23, 63, 95, .1);
}

.dx-tag-content {
    background-color: var(--app-primary-subtle);
    color: var(--app-primary);
    border-radius: 999px;
}

.dx-tag-remove-button::before,
.dx-tag-remove-button::after {
    background: var(--app-primary-light);
}

.dx-slider-range.dx-slider-range-visible {
    border-color: var(--app-primary);
    background: var(--app-primary);
}

.dx-slider .dx-slider-handle,
.dx-slider .dx-slider-handle:not(.dx-state-active) {
    background: var(--app-primary);
}

.dx-slider .dx-state-hover.dx-slider-handle:not(.dx-state-active),
.dx-slider .dx-state-active.dx-slider-handle {
    background: var(--app-primary-dark);
}

.dx-toast-info {
    background-color: var(--app-primary);
}

.dx-toast-success {
    background-color: var(--app-success);
}

.dx-toast-error {
    background-color: var(--app-danger);
}

.dx-datagrid > .dx-datagrid-headers {
    background-color: var(--app-primary-subtle);
}

.dx-datagrid-headers .dx-datagrid-text-content,
.dx-datagrid-headers .dx-header-row > td {
    color: #34465C;
    font-weight: 600;
}

.dx-datagrid-rowsview .dx-row:not(.dx-row-focused):hover > td {
    background-color: rgba(23, 63, 95, .05);
}

/* The grids scroll with the browser's own scrollbar: it keeps its room from the first frame (site.css), which
   DevExtreme's overlay scrollbar does not. */
.dx-datagrid .dx-scrollable-container {
    overflow: auto !important;
}

.dx-datagrid .dx-scrollable-scrollbar {
    display: none !important;
}

.dx-datagrid .dx-scrollable-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.dx-datagrid .dx-scrollable-container::-webkit-scrollbar-track,
.dx-datagrid .dx-scrollable-container::-webkit-scrollbar-corner {
    background: #F3F5F8;
}

.dx-datagrid .dx-scrollable-container::-webkit-scrollbar-thumb {
    background-color: #B7C3D2;
    border: 3px solid #F3F5F8;
    border-radius: 6px;
}

.dx-datagrid .dx-scrollable-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--app-primary-light);
}
