.cal-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid #dee2e6;
    font-size: 12px;
    height: 100%;
}

.cal-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-row:not(.cal-header) {
    flex: 1;
}

.cal-header {
    flex-shrink: 0;
}

.cal-header .cal-head {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 2px 6px;
    font-weight: 600;
    border-right: 1px solid #2a2a2a;
    font-size: 11px;
}

.cal-header .cal-head:last-child {
    border-right: 0;
}

.cal-cell {
    border-top: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    padding: 6px 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.cal-cell:nth-child(7n) {
    border-right: 0;
}

.cal-empty {
    background: #fafafa;
}

.cal-weekend {
    background: #fff7f7;
}

/*.cal-holiday {*/
/*    background: #ffeaea;*/
/*}*/

/*.cal-short {*/
/*    background: #fffacd;*/
/*}*/

.cal-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    flex-shrink: 0;
    line-height: 1rem;
}

.cal-date .num {
    font-weight: 700;
    font-size: 14px;
}

.cal-title {
    font-size: 9px !important;
    margin-bottom: 2px !important;
    flex-shrink: 0;
}

.cal-fill-indicator {
    font-size: 9px;
    padding: 2px 4px;
    font-weight: 600;
    background: lightgray !important;
    color: #fff;
}

.cal-fill-indicator.low {
    background: #dc3545 !important;
    color: #fff;
}

.schedule-header {
    height: 45px;
    flex-shrink: 0;
}

.schedule-body {
    height: calc(100vh - 45px);
    overflow: hidden;
}

.schedule-body .col-md-9 {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#calendar {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cal-list {
    list-style: none;
    margin: 0;
    overflow-y: auto;
    font-size: 11px;
    line-height: 1.3;
    flex: 1;
    min-height: 0;
}

.cal-cell:has(.cal-toggle.d-none) .cal-list {
    padding: 0;
}

.cal-cell:has(.cal-toggle) .cal-list {
    padding: 0 20px 0 0;
}

.cal-list.two-columns {
    column-count: 2;
    column-gap: 8px;
}

.cal-list li {
    padding: 1px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    line-height: 13px;
    font-size: 11px;
    break-inside: avoid;
}

.cal-toggle {
    font-size: 14px !important;
    padding: 4px !important;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    position: absolute;
    bottom: 6px;
    right: 10px;
    margin: 0 !important;
}

.cal-toggle i {
    font-size: 14px;
    display: flex;
}

.btn-secondary,
.bg-secondary {
    background-color: lightgrey !important;
    border-color: lightgrey !important;
}

.btn-secondary {
    color: #fff !important;
}

.btn-secondary:hover {
    background-color: #c0c0c0 !important;
    border-color: #c0c0c0 !important;
}

.cal-toggle.btn-success:hover {
    background-color: transparent !important;
    color: #198754 !important;
    border-color: #198754 !important;
}

.cal-toggle.btn-secondary {
    background-color: lightgrey !important;
    border-color: lightgrey !important;
    color: #fff !important;
}

.cal-toggle.btn-secondary:hover {
    background-color: transparent !important;
    color: lightgrey !important;
    border-color: lightgrey !important;
}

.btn:disabled,
.btn.disabled,
.btn[disabled] {
    cursor: not-allowed !important;
    pointer-events: auto !important;
}

.cal-list::-webkit-scrollbar {
    width: 4px;
}

.cal-weekend.cal-holiday .cal-date {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: baseline;
}

.cal-weekend.cal-holiday .cal-date .cal-title.text-muted {
    margin-left: 5px;
    line-height: 16px;
    margin-bottom: 0 !important;
}

.cal-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cal-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.cal-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.schedule-body .col-md-3 {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.schedule-body .col-md-3 .card {
    display: flex;
    flex-direction: column;
    height: fit-content;
    overflow: hidden;
}

#employeesList {
    flex: 1;
    overflow-y: auto !important;
    max-height: none !important;
}

#employeesList .list-group-item {
    font-size: 13px;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 3px 16px !important;
}

#employeesList .list-group-item.active {
    background-color: #e3f2fd !important;
    border-color: #dee2e6 !important;
    font-weight: 600;
    color: #212529;
}

#employeesList .list-group-item .current-user-badge {
    font-size: 10px;
    padding: 2px 6px;
}
.is-dimmed {
    opacity: .35 !important;
    filter: grayscale(1);
    color: #9aa0a6 !important;
}

#employeesList .list-group-item.is-dimmed .user-info__wrapper > span:first-child {
    filter: grayscale(1);
    opacity: .6;
}

.cal-list .cal-person.is-dimmed {
    opacity: .35 !important;
    filter: grayscale(1);
    color: #9aa0a6 !important;
}

#employeesList .list-group-item .visit-count-badge {
    font-size: 11px;
    padding: 2px 6px;
    margin-left: auto;
    background: lightgray;
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

#employeesList .list-group-item .birthday-badge {
    font-size: 11px;
    color: #ff6b6b;
    font-weight: 600;
}

#employeesList .vacation-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    margin-left: 16px;
}

.list-group-item:hover {
    cursor: pointer;
}

#employeesList .vacation-badge {
    font-size: 10px;
    padding: 2px 6px;
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffc107;
    white-space: nowrap;
}

body {
    padding: 0.75rem !important;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}


.container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.employee-name {
    font-weight: 500;
    line-height: 16px;
}

.user-info__wrapper {
    display: flex;
    align-items: center;
}

#userModal .modal-body {
    padding: 1rem !important;
}

#userModal .modal-body .mb-3 {
    margin-bottom: 0.75rem !important;
}

#userModal .modal-body label {
    font-size: 13px !important;
    font-weight: 500;
    margin-bottom: 0.25rem !important;
}

#userModal .modal-body .form-control,
#userModal .modal-body .form-select {
    font-size: 13px !important;
    padding: 0.375rem 0.5rem !important;
}

#userModal .modal-body .form-text {
    font-size: 11px !important;
    margin-top: 0.25rem !important;
}

#userModal .modal-body .btn-sm {
    font-size: 12px !important;
    padding: 0.25rem 0.5rem !important;
}

#userModal .modal-body .small {
    font-size: 11px !important;
}

#userModal .modal-body h6 {
    font-size: 14px !important;
    margin-bottom: 0.75rem !important;
}

#userModal .modal-body hr {
    margin: 0.75rem 0 !important;
}

#userModal .modal-body .card {
    margin-bottom: 0.5rem !important;
}

#userModal .modal-body .card-body {
    padding: 0.5rem !important;
}

#userModal #currentBlocksList {
    max-height: 120px !important;
    overflow-y: auto !important;
}

#userModal #currentBlocksList .alert {
    margin-bottom: 0.25rem !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 11px !important;
}

#userModal #currentBlocksList .alert .btn {
    line-height: 1;
}

#userModal .modal-header {
    padding: 0.75rem 1rem !important;
}

#userModal .modal-footer {
    padding: 0.5rem 1rem !important;
}

#userModal .modal-title {
    font-size: 16px !important;
    font-weight: 600;
}

#userModal .modal-body .btn-group {
    gap: 0 !important;
}

#userModal .modal-body input[type="date"] {
    font-size: 12px !important;
}

#userModal .modal-body input[type="color"] {
    height: 34px !important;
    padding: 0.25rem !important;
}

#userModal .modal-body .btn-check + .btn {
    font-size: 11px !important;
    padding: 0.25rem 0.5rem !important;
    /*margin-right: 4px !important;*/
}

#userModal .modal-body .btn-check + .btn:last-child {
    margin-right: 0 !important;
}

@media print {
    @page {
        size: landscape;
        margin: 0.5cm;
    }

    html {
        transform: scale(0.95);
        transform-origin: top left;
        width: 105.26%;
    }

    body {
        padding: 0 !important;
    }

    .btn-group, #btnPrint, #btnSelectUser, #btnViewOnly,
    .col-md-3, .cal-toggle, #autoForMe, .small.text-muted {
        display: none !important;
    }

    .row {
        display: block !important;
    }

    .col-md-9 {
        max-width: 100% !important;
        width: 100% !important;
    }

    .cal-grid {
        font-size: 11px !important;
    }

    .cal-cell {
        min-height: auto !important;
        padding: 3px 4px !important;
        page-break-inside: avoid;
    }

    .cal-date .num {
        font-size: 10px !important;
    }

    .cal-list {
        max-height: none !important;
        overflow: visible !important;
        font-size: 9px !important;
        line-height: 1.2;
        margin: 3px 0 0 !important;
    }

    .cal-list li {
        padding: 1px 0 !important;
    }

    .cal-fill-indicator {
        font-size: 9px !important;
        padding: 2px 4px !important;
        display: none;
    }

    .cal-title {
        font-size: 9px !important;
        margin-bottom: 2px !important;
    }

    h4 {
        font-size: 18px !important;
        margin-bottom: 0.5rem !important;
    }

    .d-flex.align-items-center.mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .modal, .modal-backdrop {
        display: none !important;
    }
}
