@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800&display=swap");

:root {
    --light-gray: #e0e0e0;
    --blue-gray: var(--app-menu-bg, #cfe2ff);
    --glacous-gray: #fff;
    --input-background-color: #e9ecef;
}

html {
    scroll-padding-top: 66px; /* header height in px */
}

body {
    background: white;
    position: relative;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.asteriskField {
    color: red;
}

.required-label:after {
    content: " *";
    color: red;
}

.django-invalid-feedback {
    color: red;
}

.accordion-header {
    background-color: var(--light-gray);
}

.accordion-body {
    background-color: var(--light-gray);
}

.flag-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1.5rem;
}

.user-label {
    font-size: 0.8rem;
}

.form-control {
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.form-select {
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.app-version {
    font-size: 0.7em;
    z-index: 999;
}

.select[readonly] {
    pointer-events: none;
}

.custom-error-message {
    font-size: .875em;
    color: #b02a37
}

.form-control:disabled {
    background-color: lightgray;
}

.card-borderless {
    --bs-card-border-color: rgba(0, 0, 0, 0);
}

.card-footer {
    background-color: #ffffff;
}

.card-header {
    background-color: #ffffff;
}

/* menu styling */

#side_nav {
    background: var(--blue-gray);
    min-width: 250px;
    max-width: 250px;
    transition: all 0.3s;
}

.content {
    min-height: 100vh;
    width: 100%;
}

hr.h-color {
    background: #000;
}

.sidebar li.active {
    background: var(--app-menu-active, dodgerblue);
    border-radius: 8px;
}

.sidebar li.active a, .sidebar li.active a:hover {
    color: #000;
}

.sidebar li a {
    color: #000;
}

@media (max-width: 992px) {
    #side_nav {
        margin-left: -250px;
        position: absolute;
        height: 100%;
        overflow-y: scroll;
        z-index: 999;
    }

    #side_nav.active {
        margin-left: 0;
    }
}

.custom-badge {
    background-color: red;
    border-radius: 33%;
}

/* hide increment and decrement buttons for number input fields for moz and blink (chromium) */
.hide-spin-buttons[type='number'] {
    -moz-appearance: textfield;
}

.hide-spin-buttons::-webkit-outer-spin-button,
.hide-spin-buttons::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.table-hover-gray {
    --bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), 0.1);
}

.nav-link.active {
    background-color: var(--app-menu-active, dodgerblue) !important;
}

.nav-tabs {
    --bs-nav-tabs-border-width: 0;
}

.enginn-icon {
    height: 1.5rem;
}

.offcanvas {
    --bs-offcanvas-bg: var(--blue-gray);
}

.ps-075rem {
    padding-left: .75rem;
}

.btn-toolbar > .btn {
    --bs-btn-bg: white;
}

.btn-group > .btn {
    --bs-btn-bg: white;
}

.htmx-submit-spinner {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request.htmx-submit-spinner {
    opacity: 1;
}

.htmx-request .htmx-submit-spinner {
    opacity: 1;
}

.menu-li-cadet {
    position: relative;
    padding-left: calc(1ch + 15px);  /* Icon width calculated as character width + 15 pixels */
}

.menu-li-cadet:before {
    content: "\F231";
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -.125em;
    margin-right: 5px;
    position: absolute;
    left: 0;
    top: 0.25em;
}

.payment-table-main {
    border-top-width: 2px;
    border-right-width: 0;
    border-left-width: 0;
    border-bottom-width: 1px;
    border-style: solid;
    border-color: black;
}

.payment-border-top-bold {
    border-top: 2px solid black;
}

.payment-border-top {
    border-top: 1px solid black;
}

.text-orange {
    color: var(--app-accent-text, #b88a00);
}

.be-fixed-toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1055; /* Ensure it's above other elements */
}

.bg-task-mobile, .bg-deadline-mobile{
    background-color: #ededed;
}

/* Floating action buttons */
.floating-action-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.floating-action-buttons.short-page {
    position: relative;
    margin-top: 1.5rem;
    border-top: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.floating-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}


.floating-action-buttons .btn-primary {
    flex: 1;
    max-width: 200px;
    color: black ;
    background-color: var(--app-accent-light, #fef4cc);
    border-color: var(--app-accent-light, #fef4cc);
}

.floating-action-buttons .btn-primary-close {
    flex: 1;
    max-width: 200px;

    font-weight: 500;
    color: black ;
    background-color: var(--app-accent, #f4c811);
    border-color: var(--app-accent, #f4c811);
    animation: attentionPulse 3s infinite;

}

@media (max-width: 768px) {
    .floating-action-buttons {
        padding: 0.5rem;
    }

    .floating-action-buttons .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Add padding to body to prevent content from being hidden behind floating buttons */
body.has-floating-buttons {
    padding-bottom: 80px;
}

body.has-floating-buttons.short-page {
    padding-bottom: 0;
}


@keyframes attentionPulse {
    0% {
        background-color: var(--app-accent, #f4c811);
    }
    50% {
        background-color: var(--app-accent, #f4c811);   /* 2 sekundy beze změny */
    }
    75% {
        background-color: var(--app-accent-light, #fef4cc);   /* poslední 1 sekunda jiná barva */
    }
    100% {
        background-color: var(--app-accent, #f4c811);   /* poslední 1 sekunda jiná barva */
    }
}


/* Bootstrap 5.3 writes these blues as literals instead of reading --bs-primary, so the
   per-customer palette has to override them here. Every fallback is Bootstrap's own value,
   so with no palette configured nothing changes. */
.form-control:focus,
.form-select:focus {
    border-color: var(--app-focus-border, #86b7fe);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25);
}

.form-check-input:checked {
    background-color: var(--app-primary, #0d6efd);
    border-color: var(--app-primary, #0d6efd);
}
