@import url("../fonts/typography/inter/wght.css");
@import url("../fonts/typography/noto-sans-tc/wght.css");
@import url("../fonts/typography/noto-sans-sc/wght.css");
@import url("../fonts/typography/jetbrains-mono/wght.css");

:root {
    --font-ui: "Inter Variable", Inter, "Noto Sans TC Variable", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", "Segoe UI", Arial, sans-serif;
    --font-code: "JetBrains Mono Variable", "JetBrains Mono", Consolas, "Noto Sans TC Variable", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", monospace;
    --toastify-font-family: var(--font-ui);
}

[lang]:lang(zh-Hans), [lang]:lang(zh-CN), [lang]:lang(zh-SG) {
    --font-ui: "Inter Variable", Inter, "Noto Sans SC Variable", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
    --font-code: "JetBrains Mono Variable", "JetBrains Mono", Consolas, "Noto Sans SC Variable", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", monospace;
    font-family: var(--font-ui);
}

[lang]:lang(zh-Hant), [lang]:lang(zh-TW), [lang]:lang(zh-HK) {
    --font-ui: "Inter Variable", Inter, "Noto Sans TC Variable", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", "Segoe UI", Arial, sans-serif;
    --font-code: "JetBrains Mono Variable", "JetBrains Mono", Consolas, "Noto Sans TC Variable", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", monospace;
    font-family: var(--font-ui);
}

html {
    font-family: var(--font-ui);
    font-size: 100%;
}

/* Override the admin template's explicit UI families, not icon glyphs. */
body, .alert, .brand, .btn-simple, .navbar, .td-name,
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
a, p, td, th, button, input, select, textarea, optgroup,
.form-control, .btn, .popover, .tooltip, .ui-widget, .swal2-popup {
    font-family: var(--font-ui);
}

body {
    font-size: 1rem;
    line-height: 1.6;
    color: #24354b;
}

p, .lead {
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

input, select, textarea, .form-control {
    font-size: 1rem;
    line-height: 1.5;
}

button, .btn {
    font-size: .75rem;
    line-height: 1.3;
}

.btn {
    padding: .25rem .6rem;
}

.btn-sm, .btn-group-sm > .btn {
    padding: .15rem .4rem;
    font-size: .6875rem;
}

.btn-lg, .btn-group-lg > .btn {
    padding: .4rem 1rem;
    font-size: .875rem;
}

.form-control:not(textarea):not([size]):not([multiple]) {
    height: auto;
    min-height: calc(1.5em + 1.2rem + 2px);
}

code, pre, kbd, samp, .note-editor.note-frame .note-editing-area .note-codable {
    font-family: var(--font-code);
}

pre {
    max-width: 100%;
    overflow: auto;
}

table, .numeric, input[type="number"], .input-numeric {
    font-variant-numeric: tabular-nums;
}

.text-muted, .form-text {
    color: #5f6b7a !important;
}

.table-responsive {
    max-width: 100%;
    overflow-x: auto;
}

.modal-title, .modal-body, .page-title, .card-title {
    overflow-wrap: anywhere;
}

@media (max-width: 48rem) {
    .modal-dialog:not(.modal-dialog-fullscreen) {
        max-width: calc(100% - 1rem);
    }

    .modal-header, .modal-footer {
        flex-wrap: wrap;
    }

    .form-inline {
        flex-wrap: wrap;
        gap: .5rem;
    }
}
