:root {
    font-family: "Roboto", sans-serif;
    scroll-behavior: smooth;
}

[data-bs-theme="light"] {
    --is-default-color: #212529;
    --is-background-color: #f3f4f4;
}

[data-bs-theme="dark"] {
    --is-default-color: #dee2e6;
    --is-background-color: #2b3035;

    .contacts iframe {
        filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
    }
}

#theme-auto,
#theme-light,
#theme-dark {
    display: none;
    color: #6c757d;
}

.is-logo {
    display: inline-block;
    width: 100%;
    height: 100%;
    background-color: #6c757d;

    mask-image: url("/images/logo.svg");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

[data-theme-state="auto"] {
    #theme-auto {
        display: inline-block;
    }
}
[data-theme-state="light"] {
    #theme-light {
        display: inline-block;
    }
}
[data-theme-state="dark"] {
    #theme-dark {
        display: inline-block;
    }
}

*:focus {
    outline: none !important;
    outline-width: 0 !important;
    box-shadow: none !important;
}

.row,
form {
    margin: 0;
}

body {
    font-family: "Roboto", sans-serif;
}

p.text-lead,
div.text-lead p {
    text-indent: 3ch;
}

p.text-justify,
div.text-justify p {
    text-align: justify;
}

.form-control.is-disabled,
.form-control.is-disabled:focus,
.form-control.is-disabled:focus-visible {
    background-color: var(--bs-secondary-bg);
    border: var(--bs-border-width) solid var(--bs-border-color);
    opacity: 1;
}

.header {
    transition: all 0.5s;
    z-index: 997;
}

.navbar-brand .is-logo {
    display: block;
    height: 38px;
    width: 38px;
}

.btn-user {
    width: 130px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fs-7 {
    font-size: 0.9rem !important;
}

.border-is {
    border-color: color-mix(in srgb, var(--is-default-color), transparent 80%) !important;
}

.footer {
    background-color: var(--is-background-color);
    border-top: 1px solid color-mix(in srgb, var(--is-default-color), transparent 80%);
    color: var(--is-default-color);
    font-size: 0.9em;
}

.footer .text-widget-wrapper {
    display: flex;
    flex: 1;
}

.footer .text-widget p {
    margin: 0;
    padding: 0;
    margin-top: 5px;
}

.footer .text-widget a {
    color: var(--is-default-color);
}

.news .add-news,
.users .add-user {
    position: fixed;
    bottom: 0.5rem;
    right: 0.5rem;
    z-index: 10;
}

.info-card {
    border: none;
    transition:
        transform 0.2s ease-in-out,
        box-shadow 0.2s ease-in-out;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem color-mix(in srgb, var(--is-default-color) 20%, transparent) !important;
}

.news .card-text p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.is-card-buttons .btn {
    padding: calc(var(--bs-btn-padding-y) * 0.5) calc(var(--bs-btn-padding-x) * 0.5);
    font-size: calc(var(--bs-btn-font-size) * 0.85);
    line-height: calc(var(--bs-btn-line-height) * 0.85);
    position: relative;
    z-index: 3;
}

.search .card-text {
    overflow: hidden;
}

.tags-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    width: 100%;
    overflow: hidden;
    min-height: 24px;
}

.tags-container .tag {
    color: var(--bs-secondary-color) !important;
    font-weight: normal;
    max-width: 20%;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    z-index: 2;
}

.cursor-default {
    cursor: default;
}

.cursor-pointer {
    cursor: pointer;
}

#quant-carousel,
#quant-carousel .carousel-item img {
    height: 40vh;
}

#quant-carousel .carousel-item img {
    object-fit: cover;
    object-position: center;
    width: auto;
}

.btn-fw {
    width: 49%;
}

.search-hl {
    color: var(--is-background-color);
    background-color: var(--is-default-color);
    font-style: normal;
}

.ql-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ql-table[data-full] {
    width: 100%;
}

.ql-table .ql-table-cell {
    border: var(--bs-border-width) solid var(--bs-border-color) !important;
    padding: 0.5rem 0.5rem;
}

.ql-table .ql-table-cell p {
    margin: 0;
    text-indent: 0;
}

.ql-table thead .ql-table-cell p {
    font-weight: bold;
}

.d-none-mobile {
    display: none;
}

.custom-modal-close {
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.7));
    opacity: 0.85;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.custom-modal-close:hover {
    opacity: 1;
    transform: scale(1.05);
}

#edit-news #panel-toggler {
    padding-top: 1px;
    padding-bottom: 1px;
    height: 24px;
    font-size: 0.8rem;
}

#attachments-container > .invalid-feedback {
    display: block !important;
    text-align: center;
    cursor: default;
}

#attachments-container.drag-over {
    border: 3px dashed var(--bs-primary-border-subtle) !important;
    background-color: var(--bs-secondary-bg) !important;
}

#attachments-container.is-invalid {
    border: var(--bs-border-width) solid var(--bs-form-invalid-border-color) !important;
}

.attachment-image {
    width: 18vh;
}

.attachment-image-modal {
    max-height: 85vh;
    object-fit: contain;
}

.attachment-progress {
    height: 3px;
}

.files-height {
    height: auto;
}

@media (max-width: 767.98px) {
    #attachments-list-root {
        height: 139px;
    }
}

@media (min-width: 768px) {
    .news .add-news,
    .users .add-user {
        position: static;
        margin: 0 auto;
    }

    .btn-fw {
        width: 160px;
    }

    .d-none-mobile {
        display: block;
    }

    .files-height {
        max-height: 480px;
    }

    .files-height:has(> :last-child:nth-child(-n + 15)) {
        max-height: 240px;
    }

    #attachments-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(100% - 32px);
    }

    .h-md-100 {
        height: 100% !important;
    }
}

@media (min-width: 992px) {
    .files-height {
        max-height: 320px;
    }

    .files-height:has(> :last-child:nth-child(-n + 15)) {
        max-height: 160px;
    }
}
