/* Global styles for the Restaurant application */

html,
body {
    direction: rtl;
    text-align: right;
}

:root .lpx-brand-logo {
    --lpx-logo: url('/images/logo/leptonx/logo-light.png');
    --lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
}

.spinner {
    width: 40px;
    height: 40px;
    display: block;
    position: fixed;
    top: calc( 50% - ( 40px / 2) );
    right: calc( 50% - ( 40px / 2) );
}

.double-bounce1, .double-bounce2 {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #333;
    opacity: 0.6;
    position: absolute;
    top: 0;
    left: 0;
    -webkit-animation: sk-bounce 2.0s infinite ease-in-out;
    animation: sk-bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
    -webkit-animation-delay: -1.0s;
    animation-delay: -1.0s;
}

@-webkit-keyframes sk-bounce {
    0%, 100% {
        -webkit-transform: scale(0.0)
    }

    50% {
        -webkit-transform: scale(1.0)
    }
}

@keyframes sk-bounce {
    0%, 100% {
        transform: scale(0.0);
        -webkit-transform: scale(0.0);
    }

    50% {
        transform: scale(1.0);
        -webkit-transform: scale(1.0);
    }
}

#ApplicationContainer > div:first-child:not(:only-child) {
    display: none !important;
}


/* Let modals size to content instead of stretching with empty space */
.modal-dialog,
.modal-dialog-centered,
.modal-dialog-scrollable {
    height: auto;
    min-height: 0;
    width: clamp(320px, 78vw, 900px);
    max-width: 92vw;
}

.modal-sm {
    width: clamp(280px, 45vw, 520px);
    max-width: 92vw;
}

.modal-lg {
    width: clamp(360px, 86vw, 1100px);
    max-width: 92vw;
}

.modal-dialog-scrollable .modal-content {
    height: auto;
    max-height: none;
    overflow: visible;
}

.modal-content {
    height: auto;
    max-height: none;
}

.modal-dialog-scrollable .modal-body {
    overflow: visible;
}

.modal-body {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
}

/* Wider edit dialogs for dense forms like purchases */
.modal-xl {
    width: clamp(420px, 92vw, 1280px);
    max-width: 92vw;
}

/* Wider BOM editor dialog to fit all columns comfortably */
.bom-modal {
    width: clamp(520px, 95vw, 1400px);
    max-width: 95vw;
}

/* Roomier modal for purchase lines listing */
.purchase-lines-modal {
    width: clamp(420px, 90vw, 1200px);
    max-width: 94vw;
}

/* Slightly improve table and form readability */
.table th,
.table td {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
}

.form-label {
    font-weight: 600;
}

/* RTL sidebar + content alignment (keeps menu toggle behavior intact) */
html[dir="rtl"] .lpx-sidebar-container {
    right: 0;
    left: auto;
}

html[dir="rtl"] .lpx-content-container {
    margin-right: 280px;
    margin-left: 0;
}

@media only screen and (max-width: 1199px) {
    html[dir="rtl"] .lpx-content-container {
        margin-right: 72px;
        margin-left: 0;
    }
}

html[dir="rtl"] #lpx-wrapper.hover-trigger .lpx-content-container {
    margin-right: 72px;
    margin-left: 0;
}

html[dir="rtl"] .lpx-footbar-container {
    right: 280px;
    left: 72px;
}

@media only screen and (max-width: 1199px) {
    html[dir="rtl"] .lpx-footbar-container {
        right: 72px;
        left: 0;
    }
}
