@tailwind components;
@tailwind utilities;

.lunch-bg-event {
    background-color: theme('colors.slate.50') !important;
    border: 1px solid theme('colors.slate.200') !important;
    border-radius: 0.25rem !important;
    /* rounded */
    opacity: 0.9 !important;
    z-index: 10 !important;
}

.lunch-bg-event .fc-event-main {
    height: 100%;
    width: 100%;
}

.part-tooltip {
    position: relative;
}

.part-tooltip i {
    font-style: normal;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.3);
    border: solid 1px rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.part-tooltip__text {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.part-tooltip__text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.part-tooltip:hover .part-tooltip__text {
    visibility: visible;
    opacity: 1;
}

/* Hide scrollbars - all browsers */
.no-scrollbar {
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}


.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@font-face {
    font-family: 'FK Grotesk Neue Regular';
    src: url('/fonts/FKGroteskNeue/FKGroteskNeue-Regular.woff2') format('woff2'),
        url('/fonts/FKGroteskNeue/FKGroteskNeue-Regular.woff') format('woff'),
        url('/fonts/FKGroteskNeue/FKGroteskNeue-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body,
button,
input,
select,
textarea,
html,
.tooltip,
.popover,
.navbar,
.btn,
.dropdown-menu {
    font-family: 'FK Grotesk Neue Regular', Sans-serif !important;
}

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

.select2-container--default .select2-selection--single {
    border-color: #e5e7eb;
    border-radius: 0.5rem;
    height: 42px;
    padding-top: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
    color: #374151;
    font-size: 0.875rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 8px;
    right: 8px;
}

.select2-container--default .select2-selection--multiple {
    border-color: #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding-left: 12px;
    padding-bottom: 4px;
}

/* Icon variant support */
.select2-with-icon .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 38px;
}

.select2-with-icon .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    padding-left: 32px;
}


.select2-compact .select2-container .select2-selection--single {
    height: 30px !important;
    display: flex;
    align-items: center;
}

.select2-compact .select2-container .select2-selection__rendered {
    font-size: 0.75rem;
    line-height: 1rem;
    padding-left: 10px;
}

.select2-compact .select2-container .select2-selection__arrow {
    top: 3px;
}

.select2-selection__clear {
    margin-left: 4px;
    margin-right: 24px;
    font-size: 14px;
}


.toggle-switch {
    background: #ccc;
}

.toggle-switch.active {
    background: #008A5E;
}

.toggle-switch.active .toggle-knob {
    transform: translateX(20px);
}


/* FullCalendar custom overrides */
.fc .fc-timegrid-slot {
    height: 1.5em;
    border-bottom: 1px dashed #e2e8f0;
}

.fc-theme-standard .fc-scrollgrid {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.fc-theme-standard th {
    border: 1px solid #f1f5f9;
    background: #ffffff !important;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
}

.fc-theme-standard td {
    border: 1px solid #e2e8f0;
}

.fc-v-event {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.fc .fc-timegrid-col.fc-day-today {
    background-color: #f8fafc;
}

.fc-event-resizer {
    bottom: 0 !important;
    height: 8px !important;
    background: transparent !important;
    cursor: ns-resize !important;
}

.fc-event-resizer::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 4px;
    transform: translateX(-50%);
    width: 32px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.2s;
}

.fc-event-resizer:hover::after {
    background: #38bdf8;
}

.fc-event-main {
    padding: 0 !important;
    overflow: visible !important;
}

.fc-timegrid-event-harness:has(.fc-event-active) {
    z-index: 9999 !important;
}

/* Collapse expanded elements while dragging/resizing */
.fc-event-dragging .fc-custom-extras,
.fc-event-resizing .fc-custom-extras {
    display: none !important;
}

.fc-event-dragging .fc-custom-wrapper,
.fc-event-resizing .fc-custom-wrapper {
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.25rem !important;
}

.fc-event-dragging .fc-custom-wrapper,
.fc-event-resizing .fc-custom-wrapper {
    box-shadow: none !important;
    border-left-width: 1px !important;
}

body .fc-direction-ltr .fc-timegrid-col-events {
    margin: 0;
}

/* Styling for restricted drag (dimming invalid columns) */
body.fc-dragging-restricted .fc-timegrid-col:not(.fc-valid-drop-target),
body.fc-dragging-restricted .fc-col-header-cell:not(.fc-valid-drop-target) {
    opacity: 0.3 !important;
    background-color: #f8fafc !important;
    /* light slate color */
    transition: opacity 0.2s, background-color 0.2s;
}

nav[aria-label="Pagination Navigation"] span[aria-current="page"]>span {
    background-color: #A3BEC6 !important;
    color: white !important;
    font-weight: bold !important;
}

/* Inline Select2 Styling to mimic transparent text select */
.inline-select2 .select2-container--default .select2-selection--single {
    background-color: transparent !important;
    border: none !important;
    height: auto !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.inline-select2 .select2-container--default.select2-container--focus .select2-selection--single {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.inline-select2 .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #000 !important;
    font-weight: bold !important;
    font-size: 0.75rem !important;
    /* text-xs */
    line-height: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    /* tracking-wider */
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
    /* pr-6 */
    position: relative;
}

.inline-select2 .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 0 !important;
    width: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.inline-select2 .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #000 transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
    margin: 0 !important;
    position: static !important;
}

.inline-select2 .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #000 transparent !important;
    border-width: 0 4px 5px 4px !important;
}

.inline-select2 .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #000 !important;
    font-weight: bold !important;
}

.inline-select2 .select2-container {
    width: auto !important;
    min-width: 80px;
    max-width: 150px !important;
}

/* Custom Dropdown Styling for Inline Select2 */
.owner-filter-dropdown {
    max-width: 250px !important;
}

/* Ensure the dropdowns in inline-select2 have proper styling */
.owner-filter-dropdown.select2-dropdown {
    border: 1px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
    padding: 0.25rem !important;
    margin-top: 0.25rem !important;
}

.owner-filter-dropdown .select2-search--dropdown {
    padding: 0.5rem !important;
}

.owner-filter-dropdown .select2-search__field {
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem !important;
    padding: 0.375rem 0.5rem !important;
    outline: none !important;
    font-size: 0.875rem !important;
}

.owner-filter-dropdown .select2-search__field:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6 !important;
}

.owner-filter-dropdown .select2-results__option {
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.25rem !important;
    margin-bottom: 2px !important;
    color: #374151 !important;
    font-weight: normal !important;
    transition: all 0.15s ease;
    white-space: normal !important;
    /* Allow text to wrap if it exceeds max-width */
}

.owner-filter-dropdown .select2-results__option:last-child {
    margin-bottom: 0 !important;
}

.owner-filter-dropdown .select2-results__option--highlighted[aria-selected] {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

.owner-filter-dropdown .select2-results__option[aria-selected=true] {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    font-weight: 500 !important;
}
/* Disable dragging when in list view */
body.fc-list-view-active .fc-process-drag-handle, 
body.fc-list-view-active .fc-chapter-drag-handle,
body.fc-list-view-active .fc-process-draggable,
body.fc-list-view-active .fc-chapter-draggable {
    pointer-events: none !important;
    opacity: 0.5;
    cursor: not-allowed !important;
}

