:root {
    --bs-font-sans-serif: "Inter", system-ui, -apple-system, sans-serif;
    --bs-body-font-size: 1rem;
}

@supports (font-variation-settings: normal) {
    :root {
        font-family: "Inter var", sans-serif;
    }
}

:root {
    --bs-border-radius: 3px;
}

.flatpickr input[readonly] {
    background-color: white;
}

input[readonly].flatpickr-input {
    background-color: white;
}

/* Make intl phone number fields full width */
.iti {
    width: 100%;
}

/* Make the switches bigger */
.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
    margin-top: 0;
}

.form-check-label {
    padding-top: 0.2rem;
    padding-left: 0.4rem;
}

.clearable {
    cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.03em;
}

h6 {
    font-size: 1.2rem;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    letter-spacing: -0.03em;
}

h1 {
    font-weight: 700;
    font-size: 2.25rem;
}

h2 {
    font-weight: 700;
    font-size: 2rem;
}

.h6 {
    font-size: 1.2rem;
}

.border-transparent {
    --bs-border-opacity: 1;
    border-color: transparent !important;
}

.stat-icon {
    width: 5rem;
    height: 5rem;
    font-size: 2rem;
    background-color: var(--bs-body-bg);
}

.table-responsive {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.table-responsive table {
    margin-bottom: 0;
}

.table-responsive tbody tr:last-of-type > * {
    border-bottom: 0;
}

.table-responsive th:first-of-type,
.table-responsive td:first-of-type {
    padding-left: 1rem;
}
.table-responsive th:last-of-type,
.table-responsive td:last-of-type {
    padding-right: 1rem;
}

thead {
    --bs-table-bg: #f8f9fa;
}

.nav-tabs {
    margin-bottom: 1rem;
}

.nav-breadcrumb {
    font-size: 0.9rem;
}

.umesh-navbar {
    border-bottom: 1px solid #e5e5e5;
}

.jumbotron {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 2rem;
}

.unselectable {
    user-select: none;
}

#map {
    height: 400px;
}

.filepond--item {
    width: calc(25% - 0.5em);
}

.filepond--root.form-control {
    border: none;
}

input[type="color"] {
    height: 3rem;
}

.copy-button {
    cursor: pointer;
}

.dev-banner {
    background-color: #e0035d;
    color: white;
    text-align: center;
    padding: 0.188rem;
}

#rsvp-loading {
    display: none;
}

#rsvp-loading.htmx-request {
    display: block;
}

.glightbox_single,
.glightbox_gallery {
    cursor: pointer;
}

/* Sidebar */
:root {
    --sidebar-expanded: 220px;
    --sidebar-collapsed: 72px;
}

.umesh-layout {
    display: flex;
    min-height: 100dvh;
    background: var(--bs-body-bg);
}

.umesh-sidebar {
    width: var(--sidebar-expanded);
    min-width: var(--sidebar-expanded);
    max-width: var(--sidebar-expanded);
    flex-shrink: 0;
    transition:
        width 0.2s ease,
        min-width 0.2s ease,
        max-width 0.2s ease;
    border-right: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100dvh;
    z-index: 1030;
    /* above content, below modal */
}

/* Tablet width sizing - Bootstrap doesn't handle this specific use case */
@media (min-width: 576px) and (max-width: 991px) {
    .umesh-sidebar {
        width: var(--sidebar-collapsed);
        min-width: var(--sidebar-collapsed);
        max-width: var(--sidebar-collapsed);
    }
}

.umesh-sidebar .sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.umesh-sidebar .brand {
    height: 58px;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.umesh-sidebar nav {
    overflow-y: auto;
    padding: 0.5rem;
    flex-grow: 1;
}

/* Menu headers */
.umesh-sidebar .menu-header {
    padding: 0.5rem 0.75rem 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--bs-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
}

.umesh-sidebar .menu-header .icon {
    font-size: 1rem;
}

/* Collapsed mode styling for tablets */
@media (min-width: 576px) and (max-width: 991px) {
    .umesh-sidebar .menu-header {
        justify-content: center;
        padding: 0.75rem;
        cursor: pointer;
    }

    .umesh-sidebar .menu-header:hover {
        background: var(--bs-secondary-bg);
    }

    .umesh-sidebar .menu-header .icon {
        font-size: 1.5rem;
    }
}

/* Sub menu items */
.umesh-sidebar .sub-menu {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.umesh-sidebar .nav-link {
    border-radius: 0.375rem;
    padding: 0.3rem 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.umesh-sidebar .nav-link:hover {
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

.umesh-sidebar .nav-link .icon {
    font-size: 1.25rem;
    line-height: 1;
    min-width: 1.25rem;
}

.umesh-sidebar .nav-link.active {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

/* Collapsed mode styling for tablets */
@media (min-width: 576px) and (max-width: 991px) {
    .umesh-sidebar .nav-link {
        justify-content: center;
        padding: 0.75rem;
    }

    .umesh-sidebar .nav-link .icon {
        font-size: 1.5rem;
    }
}

/* User section at bottom */
.umesh-sidebar .user-section {
    margin-top: auto;
    padding: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
}

.umesh-sidebar .user-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: var(--bs-body-color);
    text-decoration: none;
    transition: background-color 0.15s ease;
    font-weight: 500;
}

.umesh-sidebar .user-link:hover {
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

.umesh-sidebar .user-link .icon {
    font-size: 1.25rem;
    min-width: 1.25rem;
}

/* Collapsed mode styling for tablets */
@media (min-width: 576px) and (max-width: 991px) {
    .umesh-sidebar .user-link {
        justify-content: center;
        padding: 0.75rem;
    }

    .umesh-sidebar .user-link .icon {
        font-size: 1.5rem;
    }
}

/* Content */
.umesh-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background-color: #f3f5f6;
}

.content-title {
    background-color: white;
    margin-left: -0.8rem;
    padding-left: 1rem;
    margin-right: -0.7rem;
    padding-right: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    margin-bottom: 1rem;
    margin-top: -0.5rem;
    padding-top: 1rem;
}

.umesh-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
}

/* Mobile: hide sidebar (Bootstrap also handles with d-none d-sm-block) */
@media (max-width: 575px) {
    .umesh-sidebar {
        display: none;
    }
}

/* Offcanvas menu */
.umesh-offcanvas .nav-link {
    border-radius: 0.5rem;
}

.umesh-offcanvas .icon {
    margin-right: 0.3rem;
}

.umesh-offcanvas .sub-menu {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.umesh-offcanvas .menu-header {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--bs-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Flyout menu positioning */
.flyout-menu {
    position: fixed;
    left: 72px;
    margin-left: 0.5rem;
    width: 220px;
    max-width: 220px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1040;
    display: none;
    padding: 0.5rem;
    box-sizing: border-box;
}

.flyout-menu.show {
    display: block;
}

.flyout-menu .nav-link {
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    padding: 0.3rem 1rem;
    transition: all 0.15s ease;
    border: none;
    font-weight: 500;
}

.flyout-menu .nav-link:last-child {
    margin-bottom: 0;
}

.flyout-menu .nav-link:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    transform: translateX(0.25rem);
}

.flyout-menu .nav-link.active {
    background: var(--bs-primary);
    color: white;
}

.flyout-menu .nav-link .icon {
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

/* Account for debug bar height */
.dev-banner + .umesh-layout .umesh-sidebar {
    height: calc(100dvh - var(--debug-bar-height, 0px));
}

.umesh-sidebar .user-section {
    position: sticky;
    bottom: 0;
    background: var(--bs-body-bg);
}

.card {
    background-color: #ffffff;
    border-radius: var(--bs-border-radius);
}

/* Disabled button styling */
.btn.disabled,
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-outline-secondary.disabled,
.btn-outline-secondary:disabled {
    opacity: 0.5;
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-secondary);
}

.section-header h2.card-title {
    font-weight: 700;
    font-size: 2rem;
}

.delete-button {
    --bs-btn-color: #fff;
    --bs-btn-bg: #dc3545;
    --bs-btn-border-color: #dc3545;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #bb2d3b;
    --bs-btn-hover-border-color: #b02a37;
    --bs-btn-focus-shadow-rgb: 225, 83, 97;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #b02a37;
    --bs-btn-active-border-color: #a52834;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #dc3545;
    --bs-btn-disabled-border-color: #dc3545;
}
