/* Main app stylesheet */

:root {

    /* Controls focus color */
    --focus-bg: #fff3cd;
}

@font-face {
    font-family: "Roboto";
    src: url('../../../fonts/roboto/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Roboto";
    src: url("../../../fonts/roboto/Roboto-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Roboto";
    src: url("../../../fonts/roboto/Roboto-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

html, body {
    font-family: "Roboto", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
}

.page-bg {
    position: fixed;
    inset: 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

/* Crea spazio tra i bottoni nel pager */
.pagination .page-item {
    margin-right: 2px;
    width: 50px;
    text-align: center;
}

/* Rimuove l'arrotondamento nel pager */
.pagination .page-link {
    border-radius: 0 !important;
}

/* Rimuove l'arrotondamento nel pager */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    border-radius: 0 !important;
}

main {
    position: relative;
}

.app-header {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 50px;
    z-index: 1045; /* sopra al contenuto */
    background-color: #fff; /* evita trasparenza */
}

.app-header-spacer {
    height: 50px;
}

.app-header-content {
    height: 50px;
    padding: 6px;
}

.app-header-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.app-header-title-logo {
    height: 2em; /* oppure 1.1em se lo vuoi appena più alto */
    width: auto;
}

.app-toolbar {
    position: fixed;
    top: 50px;
    left: 0px;
    width: 100%;
    height: 50px;
    z-index: 1040; /* sopra al contenuto */
    padding: 6px;
}

.app-toolbar-spacer {
    height: 50px;
}

.app-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 1040; /* sotto modal/backdrop, sopra contenuto */
    background: transparent;
}

.app-footer .alert {
    margin: 0;
    border-radius: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-right: 1rem;
}

.app-footer-content {
    flex: 1 1 auto;
    min-width: 0;
}

.app-footer-close {
    margin-left: auto;
    flex: 0 0 auto;
}

.login-center-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-center-page > #App-Login {
    width: min(22rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
}

.login-card {
    width: min(22rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
}

.login-center-page form {
    width: 100%;
    max-width: 100%;
}

.login-center-page .form-floating {
    width: 22rem;
    max-width: calc(100vw - 4rem);
}

.login-error-slot {
    min-height: 1.75rem;
}

.login-error-message {
    margin: 0;
    color: #b91c1c;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.login-error-placeholder {
    visibility: hidden;
}

.login-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.login-title-logo {
    height: 2em; /* oppure 1.1em se lo vuoi appena più alto */
    width: auto;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    vertical-align: middle;
    line-height: 1;
}

.table thead.table-toolbar th {
    background-color: #ececec;
    color: #4a4a4a;
    border-bottom-color: #d0d0d0;
}

.app-modal .modal-dialog {
    margin: var(--bs-modal-margin) auto;
}

.app-modal .modal-content {
    height: var(--app-modal-height, calc(100vh - 6rem));
    height: var(--app-modal-height, calc(100dvh - 6rem));
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
}

.app-modal .modal-body,
.machine-modal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
}

.btn-standard {
    width: 150px;
}

.spinner-rotate {
    animation: spinner-rotate 1s steps(8) infinite;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

.toolbar-icon-button {
    width: 42px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: -1px;
}

.toolbar-dropdown-icon-button {
    height: 38px;
    position: relative;
    top: -1px;
}

.toolbar-icon-button .material-symbols-outlined {
    font-size: 24px;
}

.form-control:not([readonly]):focus,
.form-select:not(:disabled):focus {
    background-color: var(--focus-bg);
}

.cursor-pointer {
    cursor: pointer;
}
