.brand-logo {
    width: 250px;
}

.sidebar-brand-logo {
    width: 176px;
}

.card-datatable {
    padding: 1rem !important;
}

.swal2-container.swal2-top-end,
.swal2-container.swal2-top-start,
.swal2-container.swal2-top {
    z-index: 999999 !important;
}

.dropify-wrapper .dropify-message span.file-icon {
    font-size: 24px;
}

.dropify-wrapper .dropify-message p {
    font-size: 20px;
}

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

.impersonate-alert {
    top: 74px;
    z-index: 1040;
    padding: 2px 10px;
}

.with-impersonate {
    margin-top: 34px;
    /* navbar height (64) + alert height (32) */
}

#calendar {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.fc .fc-timeline-slot {
    border-right: 1px solid #dee2e6;
}

.fc .fc-resource-cell {
    border-bottom: 1px solid #dee2e6;
}


.fc-event {
    min-width: auto !important;
}

.fc-event-title,
.fc-event-main {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

.custom-event-content {
    display: block;
}

.custom-event-content .event-time {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 2px;
}

.custom-event-content .event-title {
    font-size: 12px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

/* Resource label with avatar */
.resource-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.resource-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #592cad;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
}

.resource-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.resource-name {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

/* Branch resource label - single line display */
.fc-branch-resource .resource-label {
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

.fc-branch-resource .resource-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Event visual polish */
.fc .fc-timeline-event {
    min-height: 32px;
}

.fc .fc-h-event .fc-event-main {
    color: white !important;
}

.fc .fc-resource-cell,
.fc .fc-timeline-slot {
    border-color: #e5e7eb;
}

/* Strengthen header and grid borders */
.fc-theme-standard .fc-scrollgrid {
    border-color: #e5e7eb;
}

/* Make date header row sticky when scrolling horizontally */
/* For FullCalendar timeline view - make header sticky during horizontal scroll */
/* Top position will be calculated dynamically via JavaScript */
:root {
    --fc-sticky-header-top: 0px;
    /* Fallback value, will be updated by JS */
}

/* Ensure parent containers allow sticky positioning */
.fc .fc-scroller-harness,
.fc .fc-scroller-harness-liquid {
    position: relative;
}

.fc .fc-scroller {
    position: relative;
}

/* Ensure the view harness allows sticky */
.fc .fc-view-harness {
    position: relative;
}

/* Ensure scrollgrid allows sticky */
.fc .fc-scrollgrid-sync-table {
    position: relative;
}

/* Make the entire timeline header sticky */
.fc-timeline-header {
    position: sticky !important;
    top: var(--fc-sticky-header-top, 0px) !important;
    z-index: 30 !important;
    background-color: var(--bs-card-bg, #fff) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.fc .fc-scrollgrid-section-header {
    position: sticky !important;
    top: var(--fc-sticky-header-top, 0px) !important;
    z-index: 30 !important;
    background-color: var(--bs-card-bg, #fff) !important;
}

.fc .fc-col-header {
    position: sticky !important;
    top: var(--fc-sticky-header-top, 0px) !important;
    z-index: 30 !important;
    background-color: var(--bs-card-bg, #fff) !important;
}

.fc .fc-col-header-cell {
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    background-color: var(--bs-card-bg, #fff) !important;
    position: sticky !important;
    top: var(--fc-sticky-header-top, 0px) !important;
    z-index: 30 !important;
}

/* Ensure header cells have proper background to prevent content showing through */
.fc .fc-col-header-cell-fc {
    background-color: var(--bs-card-bg, #fff) !important;
}

/* For timeline view header specifically */
.fc-timeline-header .fc-scrollgrid-section-header {
    position: sticky !important;
    top: var(--fc-sticky-header-top, 0px) !important;
    z-index: 30 !important;
    background-color: var(--bs-card-bg, #fff) !important;
}

.fc-timeline-header .fc-col-header {
    position: sticky !important;
    top: var(--fc-sticky-header-top, 0px) !important;
    z-index: 30 !important;
    background-color: var(--bs-card-bg, #fff) !important;
}

.fc-timeline-header .fc-col-header-cell {
    position: sticky !important;
    top: var(--fc-sticky-header-top, 0px) !important;
    z-index: 30 !important;
    background-color: var(--bs-card-bg, #fff) !important;
}

/* Ensure the header scroller can scroll (will be synced via JS) */
.fc-timeline-header .fc-scroller {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

/* Make sure the scrollgrid container allows sticky */
.fc .fc-scrollgrid {
    position: relative;
}

.fc .fc-timeline-slot {
    border-top: 1px solid #f3f4f6;
}

.fc .fc-datagrid-cell {
    border-right: 1px solid #e5e7eb;
}

/* Enhanced modal styles */
.shift-detail-card {
    background: linear-gradient(135deg, #002efd 0%, #764ba2 100%);
    color: #000000;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.shift-detail-card h4 {
    margin: 0 0 15px 0;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.detail-item {
    background: rgba(255, 255, 255, 0.747);
    border-radius: 10px;
    padding: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
}

.users-avatars {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #592cad;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.edit-form-group {
    margin-bottom: 20px;
}

.edit-form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.edit-form-group input,
.edit-form-group select,
.edit-form-group textarea {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.edit-form-group input:focus,
.edit-form-group select:focus,
.edit-form-group textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.btn-action {
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-edit {
    background: #f59e0b;
    color: white;
}

.btn-edit:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
}


.select2-dropdown {
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
}

.select2-container--open {
    z-index: 9999 !important;
}

.select2-container--default .select2-dropdown--below {
    border-top: none !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}

.select2-container {
    z-index: 9999 !important;
}

.pac-container {
    z-index: 2000;
}

@media (max-width: 768px) {
    .fc-toolbar-title {
        font-size: 1rem !important;
    }

    .resource-label {
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: normal;
    }

    .resource-avatar img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
    }

    .fc .fc-scrollgrid {
        overflow-x: auto;
    }

    .modal,
    .offcanvas {
        z-index: 9999 !important;
    }

    .fc {
        z-index: 1;
    }
}

.ck-editor__editable_inline {
    min-height: 200px;
}

/* Style for rendered HTML notes in shift details modal */
#md-note {
    white-space: normal;
    word-wrap: break-word;
}

#md-note p {
    margin-bottom: 0.5rem;
}

#md-note p:last-child {
    margin-bottom: 0;
}

/* Branch resource styling - non-interactive rows */
.fc-branch-resource {
    pointer-events: none !important;
    user-select: none !important;
    background-color: #f0f4ff !important;
    border-top: 2px solid #667eea !important;
    border-bottom: 2px solid #667eea !important;
}

.fc-branch-resource .fc-timeline-bg-harness {
    pointer-events: none !important;
}

.fc-branch-resource .fc-timeline-event {
    display: none !important;
}

/* Prevent selection on branch resource timeline cells */
.fc-branch-resource .fc-timeline-slot {
    pointer-events: none !important;
    background-color: #f8f9ff !important;
}

/* Ensure branch resource cells are non-interactive */
.fc-timeline-body .fc-branch-resource {
    pointer-events: none !important;
}

.fc-timeline-body .fc-branch-resource * {
    pointer-events: none !important;
}

/* Month selector calendar icon button styling */
.fc-monthSelector-button {
    padding: 4px 8px !important;
    min-width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
}

.fc-monthSelector-button i {
    font-size: 20px !important;
    line-height: 0 !important;
    display: inline-block !important;
}

.fc-timeline-body .fc-timeline-event {
    margin-bottom: 6px;
}

/* Add spacing between events in list view */
.fc-list-event + .fc-list-event {
    margin-top: 8px;
}

.fc-list-event {
    margin-bottom: 8px;
}
