/* roboto-cyrillic-ext-wght-normal */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/roboto-cyrillic-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* roboto-cyrillic-wght-normal */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/roboto-cyrillic-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* roboto-latin-ext-wght-normal */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/roboto-latin-ext-wght-normal.woff2") format("woff2-variations");
    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;
}

/* roboto-latin-wght-normal */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/roboto-latin-wght-normal.woff2") format("woff2-variations");
    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;
}

/* roboto-cyrillic-ext-wght-italic */
@font-face {
    font-family: "Roboto";
    font-style: italic;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/roboto-cyrillic-ext-wght-italic.woff2") format("woff2-variations");
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* roboto-cyrillic-wght-italic */
@font-face {
    font-family: "Roboto";
    font-style: italic;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/roboto-cyrillic-wght-italic.woff2") format("woff2-variations");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* roboto-latin-ext-wght-italic */
@font-face {
    font-family: "Roboto";
    font-style: italic;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/roboto-latin-ext-wght-italic.woff2") format("woff2-variations");
    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;
}

/* roboto-latin-wght-italic */
@font-face {
    font-family: "Roboto";
    font-style: italic;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/roboto-latin-wght-italic.woff2") format("woff2-variations");
    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;
}

:root {
    --bs-font-sans-serif: "Roboto", Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
}

.form-floating > .form-control,
.form-floating > .form-control-plaintext,
.form-floating > .form-select {
    padding-top: 1.625rem;
    padding-bottom: .625rem;
}

.form-floating > label {
    color: rgba(var(--bs-body-color-rgb), .65);
    opacity: 1;
    transform: scale(.85) translateY(-.5rem) translateX(.15rem);
}

.form-floating > label::after {
    position: absolute;
    inset: 1rem .375rem;
    z-index: -1;
    height: 1.5em;
    content: "";
    background-color: var(--bs-secondary-bg);
    border-radius: var(--bs-border-radius);
}

.registry-filter-switch {
    width: fit-content;
}

.registry-filter-value-group {
    min-width: 0;
}

.registry-filter-value-dropdown {
    min-width: 0;
}

.registry-filter-value-dropdown [data-registry-filter-summary] {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visitor-combobox-options {
    max-height: 16rem;
}

.visit-datetime-value {
    padding-top: 1rem !important;
    font-size: 1.5rem;
    text-align: center;
}

.visit-datetime-value::-webkit-date-and-time-value {
    text-align: center;
}

.registry-pdf-dropzone {
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.registry-pdf-dropzone.is-dragover {
    border-color: var(--bs-primary) !important;
    background-color: rgba(var(--bs-primary-rgb), .08);
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15);
}

.partner-file-dropzone {
    border: 2px dashed #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.partner-file-dropzone.is-dragover {
    border-color: #556ee6;
    background-color: rgba(85, 110, 230, 0.05);
}

@media (min-width: 768px) and (max-width: 1280px) {
    .registry-pdf-action-label {
        display: none;
    }

    .registry-pdf-action-icon {
        margin-right: 0 !important;
    }
}

.statement-preview-table table {
    min-width: 1180px;
}

.statement-preview-purpose {
    min-width: 20rem;
    max-width: 32rem;
    white-space: normal;
}

#sidebar-menu .menu-title {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto !important;
    cursor: pointer !important;
    user-select: none;
    transition: color 0.15s ease-in-out;
}

#sidebar-menu .menu-title:hover {
    color: #a6b0cf !important;
}

#sidebar-menu .menu-title .menu-title-chevron {
    font-size: 0.95rem;
    line-height: 1;
    transition: transform 0.2s ease-in-out;
    opacity: 0.75;
}

#sidebar-menu .menu-title:hover .menu-title-chevron {
    opacity: 1;
}

#sidebar-menu .menu-title.collapsed .menu-title-chevron {
    transform: rotate(-90deg);
}

body:not(.vertical-collpsed) #sidebar-menu li.sidebar-item-collapsed {
    display: none !important;
}

/* Scrollable modal fix when modal-content contains form */
.alert.auto-alert-hiding {
    opacity: 0 !important;
    transform: translateY(-.25rem);
    transition: opacity 250ms ease, transform 250ms ease;
}

@media (prefers-reduced-motion: reduce) {
    .alert.auto-alert-hiding { transition: none; }
}

@keyframes modal-backdrop-pulse {
    0%, 100% { transform: scale(1); }
    48% { transform: scale(1.05); }
}

.modal.show .modal-dialog.modal-backdrop-pulse {
    animation: modal-backdrop-pulse 540ms ease-in-out !important;
}

@media (prefers-reduced-motion: reduce) {
    @keyframes modal-backdrop-pulse-reduced {
        0%, 100% { transform: scale(1); }
        48% { transform: scale(1.025); }
    }

    .modal.show .modal-dialog.modal-backdrop-pulse {
        animation: modal-backdrop-pulse-reduced 380ms ease-in-out !important;
    }
}

.modal-dialog-scrollable .modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-content > form > .modal-body {
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.modal-dialog-scrollable .modal-content > form > .modal-header,
.modal-dialog-scrollable .modal-content > form > .modal-footer {
    flex-shrink: 0;
}

/* Form Builder drag-and-drop & ordering styles */
.form-builder-field-card,
.form-builder-field-row {
    transition: box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.form-builder-field-card.is-dragging {
    opacity: 0.45;
    border: 2px dashed #556ee6 !important;
    background-color: rgba(85, 110, 230, 0.06) !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.form-builder-field-row.is-dragging {
    opacity: 0.45;
    background-color: rgba(85, 110, 230, 0.08) !important;
    outline: 2px dashed #556ee6 !important;
}

.form-builder-drag-handle {
    cursor: grab !important;
    user-select: none;
    touch-action: none;
}

#system-toast-container {
    z-index: 1090;
    max-width: 100%;
    pointer-events: none;
    overflow: hidden;
}

[data-toast-message] {
    display: none !important;
}

#system-toast-container .toast-body span {
    white-space: pre-line;
}

#system-toast-container .toast {
    pointer-events: auto;
}

#system-toast-container .system-toast {
    position: relative;
    background-color: var(--system-toast-background);
    color: var(--system-toast-color);
    border: 1px solid var(--system-toast-color);
    opacity: 1;
}

#system-toast-container .system-toast.is-leaving {
    pointer-events: none;
}

.system-toast-success {
    --system-toast-background: rgba(218, 245, 231, 0.88);
    --system-toast-color: #165c3b;
}

.system-toast-danger {
    --system-toast-background: rgba(253, 224, 224, 0.88);
    --system-toast-color: #8b2020;
}

.system-toast-warning {
    --system-toast-background: rgba(255, 242, 207, 0.88);
    --system-toast-color: #795500;
}

.system-toast-info {
    --system-toast-background: rgba(220, 237, 252, 0.88);
    --system-toast-color: #1b4f7d;
}

#system-toast-container .system-toast .toast-body,
#system-toast-container .system-toast .toast-header {
    padding-right: 2.25rem;
}

#system-toast-container .system-toast .toast-header {
    background: transparent;
    color: inherit;
}

#system-toast-container .system-toast .btn-close {
    position: absolute;
    top: 0.375rem;
    right: 0.375rem;
    margin: 0;
    padding: 0.375rem;
    font-size: 0.625rem;
}

.form-builder-drag-handle:active,
.form-builder-field-row.is-dragging .form-builder-drag-handle,
.form-builder-field-card.is-dragging .form-builder-drag-handle {
    cursor: grabbing !important;
}
