/*
 * Global application stylesheet.
 * Imports third-party CSS (Bootstrap, React-Toastify, Syncfusion PDF Viewer), registers the Dancing Script font (used for signature stamp annotations), and provides custom overrides for z-indexing, PDF viewer layout tweaks, and Bootstrap utility extensions.
 */

@import "../node_modules/bootstrap/dist/css/bootstrap.min.css";
@import '../node_modules/react-toastify/dist/ReactToastify.css';

/* Syncfusion PDF Viewer */
@import '../node_modules/@syncfusion/ej2-base/styles/bootstrap5.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/bootstrap5.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/bootstrap5.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/bootstrap5.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/bootstrap5.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/bootstrap5.css';
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/bootstrap5.css';
@import "../node_modules/@syncfusion/ej2-pdfviewer/styles/bootstrap5.css";

/* Dancing Script font */
@font-face {
    font-family: 'Dancing Script';
    src: local('DancingScript-Regular'), url('./assets/fonts/Dancing_Script/DancingScript-Regular.ttf')
}

/* Apply a rounded clipping mask to the PDF viewer */
.card-body .e-pv-viewer-main-container,
.card-body .e-pv-sidebar-toolbar,
.card-body .e-pv-organize-window,
.card-body .pdf-viewer-loading-spinner {
    clip-path: inset(0 round var(--bs-card-border-radius));
}

/* PDF viewer loading spinner custom z-index */
.card-body .pdf-viewer-loading-spinner {
    z-index: 1030 !important;
}

/* Navbar custom z-index */
.navbar-z-index {
    z-index: 1050 !important;
}

/* PDF viewer tooltips custom z-index */
.e-tooltip-wrap {
    z-index: 1060 !important;
}

/* Disable additional menu options button on mobile PDF viewer layout */
.card-body .e-toolbar-item.e-template:has(button[id="pdf-viewer_more_option"]) {
    display: none;
}

/* Hide PDF viewer page organizer "Save As" button */
.card-body .e-pv-organize-window .e-footer-content button.e-control:nth-child(1) {
    display: none;
}

/* Add margin to PDF viewer page thumbnail containers to account for page action dropdown buttons */
.card-body .e-pv-thumbnail:has(div[id^="pdf-viewer_thumbnail_Selection_Ring"] > :nth-child(2)) {
    margin-bottom: calc(0.25rem + 86px);
}

/* Prevent DropDownButtonComponent margin and width from affecting actual dropdown menu popup */
.e-dropdown-popup.mt-1.w-100 {
    margin: auto !important;
    width: auto !important;
}

/* Custom list group background classes */
.semi-primary {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
}
.semi-primary:hover {
    background-color: var(--bs-primary-bg-subtle) !important;
    color: var(--bs-list-group-action-hover-color) !important;
}

/* Bootstrap modal custom width */
.modal-w50 {
    max-width: none !important;
    width: 50%;
}

/* Bootstrap modal suspended state */
.modal.show.suspended {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s linear, visibility 0s linear 0.3s;
    visibility: hidden;
}
.modal.show:not(.suspended) {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.15s linear;
    visibility: visible;
}

/* Bootstrap modal z-index override
   Fixes case where Syncfusion PDF viewer dialog appears above modal */
.modal {
    --bs-modal-zindex: 2055;
}

/* Custom Bootstrap ratio classes for images */
.ratio-3x1 {
    --bs-aspect-ratio: calc((1 / 3) * 100%);
}

/* Bootstrap select element focus-visible override */
.form-select.no-focus-transformation:focus-visible {
    color: inherit;
    text-shadow: inherit;
}