/* Prisma application-level CSS loaded after the vendor theme bundle. */

.macro-food-link,
.macro-food-link span,
.arena-group-link,
.arena-group-link span,
.arena-menu-item,
.arena-menu-item span,
.food-group-link,
.food-group-link span,
.food-menu-item,
.food-menu-item span {
    color: #03173d !important;
}

.arena-group-link,
.arena-group-link span,
.arena-menu-item,
.arena-menu-item span {
    color: #f6c26f !important;
}

.nav-section-automation {
    color: #7ddc84 !important;
}

/* Sidebar: stesso rosso del btn-danger e testo bianco pieno */
/* .sidebar { */
/* background-color: var(--bs-danger) !important; */
/* color: #fff !important; */

/* opacity: 1 !important; */
/* background-color: rgba(210, 45, 45) !important; */
/* } */

.sidebar-brand,
.sidebar-nav .nav-link,
.sidebar-nav .nav-link.nav-link-indent-2,
.nav-section-title,
.user-info-text,
.user-email {
    color: #fff !important;
}

/* SaaS: logo LPL + ragione sociale tenant */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
}
.sidebar-brand-logo {
    height: 28px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
    border-radius: 4px;
    padding: 2px 4px;
}
.sidebar-brand-text {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Custom: dropdown compatti uniformi */
.form-select {
    font-family: "Inter", sans-serif !important;
    font-size: 10px !important;
    padding: 0.35rem 2rem 0.35rem 0.5rem !important;
    font-weight: 400;
}

.select2-container--bootstrap-5 .select2-selection {
    font-family: "Inter", sans-serif !important;
    font-size: 10px !important;
    padding: 0.35rem 0.5rem !important;
    font-weight: 400;
    min-height: auto !important;
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
    border: var(--bs-border-width) solid transparent !important;
}

.select2-container--bootstrap-5 .select2-selection__rendered {
    line-height: 1.3 !important;
    padding: 0 !important;
    color: var(--bs-body-color) !important;
}

.select2-container--bootstrap-5 .select2-selection__arrow {
    height: 100% !important;
}

/* BEGIN MERGED FROM styles.css - 2026-03-05 12:32:34 */

/* ======================
   APP SHELL (sidebar + main)
   Sidebar fixed: off-canvas by default; docked only from xl up.
   Avoids coverage when theme.bundle (768px) and app (1200px) disagree,
   or when CSS viewport is <1200 (zoom / display scaling).
====================== */
:root {
    --app-sidebar-width: 280px;
    --app-sidebar-bp: 1200px;
}

.sidebar {
    width: var(--app-sidebar-width);
    max-width: var(--app-sidebar-width);
    z-index: 1040;
    /* Override theme.bundle default (visible fixed): hide until docked/open */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.show {
    transform: translateX(0);
}

.main-content {
    padding: 20px;
    margin-left: 0;
    transition: margin-left 0.3s ease-in-out;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.content-wrapper {
    min-width: 0;
    max-width: 100%;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(15, 23, 42, 0.45);
    border: 0;
    padding: 0;
    cursor: pointer;
}

.sidebar-backdrop.is-visible {
    display: block;
}

/* Docked desktop: sidebar always visible, content reserved beside it */
@media (min-width: 1200px) {
    .sidebar,
    .sidebar.show {
        width: var(--app-sidebar-width);
        max-width: var(--app-sidebar-width);
        transform: none;
    }

    .main-content {
        margin-left: var(--app-sidebar-width);
    }

    .sidebar-backdrop,
    .sidebar-backdrop.is-visible {
        display: none;
    }

    .mobile-menu-btn {
        display: none;
    }
}

/* Off-canvas until xl (covers theme.bundle's 768px-only hide) */
@media (max-width: 1199.98px) {
    .sidebar {
        width: min(var(--app-sidebar-width), calc(100vw - 2rem));
        max-width: calc(100vw - 2rem);
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        /* Clear fixed hamburger so page headers are not covered */
        padding-top: 4rem;
    }

    .sidebar-nav,
    .sidebar .collapse,
    .sidebar .collapsing,
    .sidebar .nav-section-title,
    .sidebar .user-info {
        display: block;
        width: 100%;
    }

    .sidebar-nav .nav-link,
    .sidebar .collapse .nav-link {
        display: flex;
        width: 100%;
        white-space: normal;
        flex-wrap: nowrap;
    }

    .mobile-menu-btn {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1100;
        background: #1e3a8a;
        color: #fff;
        border: none;
        padding: .5rem;
        border-radius: .375rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    }
}


/* ======================
     ASIDE DETTAGLI DESKTOP
  ====================== */
@media (min-width: 992px) {
    .aside-macro {
        position: sticky;
        top: 60px;
        align-self: start;
        max-height: 90vh;
        overflow-y: auto;
    }
}


/* ======================
     ASIDE DETTAGLI MOBILE
  ====================== */
@media (max-width: 991.98px) {
    .aside-macro {
        position: fixed !important;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 50vh;
        background-color: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        z-index: 1050;
        border-top: 2px solid #ccc;
        transform: translateY(0);
        /* visible */
        transition: transform 0.3s ease-in-out;
    }

    .aside-macro.hidden {
        transform: translateY(100%);
        /* hide */
    }
}


/* ======================
     CLOSE BUTTON STYLES
  ====================== */
.aside-close-btn {
    text-align: end;
    padding: 0.75rem 1rem 0 0;
}

.aside-close-btn .btn-close {
    background-color: #ccc;
    border-radius: 50%;
    padding: 0.25rem;
}

/* Mostra la X solo su mobile */
@media (min-width: 992px) {
    .aside-close-btn {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .aside-close-btn {
        display: block !important;
    }
}


/* Page Header */
.page-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Flash Messages */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* END MERGED FROM styles.css */

/* BEGIN PROJECT FORM STANDARDIZATION */
:root {
    --app-form-label-font-size: .75rem;
    --app-form-label-color: #1f2937;
}

.form-label,
.form-label-sm {
    color: var(--app-form-label-color);
    font-size: var(--app-form-label-font-size);
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-control,
.form-control-sm {
    border-radius: var(--bs-border-radius-sm);
    font-size: .75rem;
    min-height: calc(1.5em + 1rem + var(--bs-border-width)*2);
    padding-bottom: .5rem;
    padding-left: .75rem;
    padding-right: .75rem;
    padding-top: .5rem;
}

textarea.form-control,
textarea.form-control-sm {
    min-height: calc(1.5em + 1rem + var(--bs-border-width)*2);
}

input[type=date].form-control,
input[type=date].form-control-sm,
input[type=datetime-local].form-control,
input[type=datetime-local].form-control-sm,
input[type=number].form-control,
input[type=number].form-control-sm,
input[type=text].form-control,
input[type=text].form-control-sm,
input[type=email].form-control,
input[type=email].form-control-sm,
input[type=tel].form-control,
input[type=tel].form-control-sm,
input[type=password].form-control,
input[type=password].form-control-sm {
    line-height: 1.35;
}

.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: var(--bs-secondary-color);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear,
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 100%;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: var(--bs-border-radius-sm);
    font-size: .75rem;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border-radius: calc(var(--bs-border-radius-sm) - 0.125rem);
    min-height: calc(1.5em + 1rem + var(--bs-border-width)*2);
}

/* END PROJECT FORM STANDARDIZATION */

/* BEGIN DDT EDIT PANEL UX */
.ddt-edit-panel {
    background: linear-gradient(180deg, #f5f9fc 0%, #f9fbfd 100%);
    border: 1px solid #dbe5ee !important;
}

.ddt-edit-panel .form-label,
.ddt-edit-panel .form-label-sm {
    font-weight: 600;
    color: #334155;
}

.ddt-edit-panel .form-control,
.ddt-edit-panel .form-control-sm,
.ddt-edit-panel textarea.form-control,
.ddt-edit-panel textarea.form-control-sm {
    background-color: #ffffff;
    border: 1px solid rgba(13, 202, 240, 0.65);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ddt-edit-panel .form-control:focus,
.ddt-edit-panel .form-control-sm:focus,
.ddt-edit-panel textarea.form-control:focus,
.ddt-edit-panel textarea.form-control-sm:focus {
    border-color: #0dcaf0;
    box-shadow: 0 0 0 0.2rem rgba(13, 202, 240, 0.2);
}

/* END DDT EDIT PANEL UX */

/* BEGIN BUTTON PALETTE STANDARD */
:root {
    --btn-dup-bg: #7cd992;
    --btn-dup-border: #6dcb84;
    --btn-dup-hover-bg: #67c57e;
    --btn-dup-hover-border: #5ab271;
    --btn-dup-text: #0f2f1a;
}

.btn-duplicate {
    background-color: var(--btn-dup-bg);
    border-color: var(--btn-dup-border);
    color: var(--btn-dup-text);
}

.btn-duplicate:hover,
.btn-duplicate:focus,
.btn-duplicate:active {
    background-color: var(--btn-dup-hover-bg) !important;
    border-color: var(--btn-dup-hover-border) !important;
    color: var(--btn-dup-text) !important;
}

.btn-duplicate:focus {
    box-shadow: 0 0 0 .2rem rgba(124, 217, 146, .28);
}

/* Modal trascinabili (header) */
.modal[data-draggable-modal] .modal-header {
    cursor: move;
    user-select: none;
}

.modal[data-draggable-modal] .modal-header button,
.modal[data-draggable-modal] .modal-header .btn-close,
.modal[data-draggable-modal] .modal-header a {
    cursor: pointer;
}

/* END BUTTON PALETTE STANDARD */