/****************************************************************************************
 *                                  Reusable "Components"
 ***************************************************************************************/

[x-cloak] {
  display: none !important;
}

/* Reduce font size for all datepicker text */
.datepicker {
  font-size: 0.75rem !important; /* Tailwind's text-sm = 0.875rem; text-xs = 0.75rem */
}

.datepicker .datepicker-cell,
.datepicker .datepicker-header,
.datepicker .datepicker-footer {
  font-size: 0.75rem !important;
}

/* Selected date and hover state */
.datepicker .datepicker-cell.selected,
.datepicker .datepicker-cell:hover,
.datepicker .datepicker-header button:focus,
.datepicker .datepicker-header button:hover {
    background-color: #05885E !important;
    color: white !important;
}

/* Footer buttons (like "Today" or "Clear") */
.datepicker .datepicker-footer button {
    background-color: #05885E !important;
    border-color: #05885E !important;
    color: white !important;
}

.datepicker-footer button:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px #1AD1A3 !important;
    border-color: #1AD1A3 !important;
}

/* On hover, arrows become white */
.datepicker-header button:hover svg {
    color: #ffffff;
    fill: #ffffff;
    stroke: #ffffff;
}

.datepicker-header button:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px #1AD1A3 !important;
    border-color: #1AD1A3 !important;
}

.datepicker .clear-btn {
  display: none !important;
}

.datepicker .today-btn {
  width: 100% !important;
  font-size: 0.75rem !important;
}

#nav-tab-background {
    position: absolute;
    bottom: 4px;          /* Add padding to the bottom */
    left: 0;
    height: calc(100% - 8px);  /* Adjust the height to account for padding (4px top and 4px bottom) */
    width: 0;
    background-color: #f3f4f6; /* bg-gray-100 */
    transition: transform 0.3s ease-in-out, width 0.3s ease-in-out; /* Smooth transition */
    border-radius: 8px;
    z-index: 0; /* Put it under the tab text but above the container */
}

.nav-tab-item {
    position: relative;
    z-index: 1;
    padding-top: 8px;    /* Add some padding on top */
    padding-bottom: 8px; /* Add some padding on bottom */
}

.tiptap p.is-editor-empty:first-child::before {
  color: #adb5bd;
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

.tiptap h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
  line-height: 1.2;
}

.tiptap h2 {
  font-size: 1.875rem;
  font-weight: 600;
  margin: 0.9rem 0 0.5rem;
  line-height: 1.3;
}

.tiptap h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.8rem 0 0.4rem;
  line-height: 1.4;
}

.tiptap h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0.7rem 0 0.3rem;
  line-height: 1.5;
}

.tiptap h5 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.6rem 0 0.3rem;
  line-height: 1.6;
}

.tiptap h6 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.tiptap ul {
  list-style-type: disc;
  padding-left: 1.25rem;
}

.tiptap ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
}

.tiptap li {
  margin-bottom: 0.25rem;
}

.tiptap a {
  color: #05885E;
  text-decoration: underline;
}

.is-active {
    background-color: #E5E7EB;
    border-color: #E5E7EB;
}

/* --------------------------------------- Alerts --------------------------------------- */

/* --break-tablet-small */
@media (min-width: 480px) {
    .common-template-django-messages {
        margin-top: 10px;
    }
}

/* --------------------------------------- Forms --------------------------------------- */

/* >>> Forms <<< */

.common-form {
    padding: 0 16px;
}

.common-form div:not(:first-child) {
    margin-top: 16px;
}

.common-form__form-items {
    display: flex;
    flex-direction: column;
}

.common-form__form-items div:not([class]) {
    display: flex;
    flex-direction: column;
}

.common-form__form-items ul.errorlist {
    order: 1;
    margin-top: 5px;
}

.common-form__form-items li {
    color: var(--color-error);
    font: var(--font-size-small) var(--font-family-body);
}

.common-form__form-items--hidden {
    display: none;
}

/* --break-tablet-large */
@media (min-width: 768px) {
    .common-form {
        padding: 0;
    }
}

.common-form .common-form__form-horizontal {
    display: flex;
}

.common-form .common-form__form-horizontal div {
    width: 100%;
    margin-top: 0;
}

.common-form .common-form__form-horizontal div:not(:first-child) {
    margin-left: 8px;
}

.search-filters-badge {
    right: 0.35rem;
}

/* ----------------------------------------- Lists ------------------------------------------ */

.common-list-item {
    display: flex;
    padding: 16px 16px;
    border-bottom: 1px solid var(--color-border);
}

/* --break-tablet-small */
@media (min-width: 480px) {
    .common-list-item {
        padding: 16px 32px;
    }
}

.common-list-item__left-action,
.common-list-item__left-action a {
    color: var(--color-primary);
}

.common-list-item__logo {
    display: flex;
    align-items: flex-start;
}

.common-list-item__logo img {
    width: var(--dim-list-item-image-width);
    min-width: var(--dim-list-item-image-width);
    border-radius: 50%;
}

.common-list-item__details--navbar {
    display: flex;
    width: 100%;
    margin-left: 16px;
}

.common-list-item__details {
    flex: 1;
    min-width: 0; /* Required for text truncation */
    margin-left: 10px;
}

.common-list-item__details h2 {
    font-weight: bold;
}

.common-list-item__details h2 span {
    color: var(--color-secondary);
    font-size: var(--font-size-tiny);
}

.common-list-item__trailing-details {
    display: flex;
    flex-shrink: 0; /* Prevent shrinking */
    align-items: center;
    justify-content: flex-end;
    margin-left: auto; /* Push to far right */
}

.common-list-result-alert {
    padding: 10px;
    text-align: center;
}

/* --break-screen-small */
@media (min-width: 1024px) {
    .common-list li:last-child > a {
        border-bottom: 0;
    }
}

/* --------------------------------------- Navigation --------------------------------------- */

/* >>> Nav Icons <<< */

.common-nav-icons ul {
    display: flex;
    justify-content: center;
    padding: 12px 16px 4px;
}

.common-nav-icons li {
    width: 100%;
    cursor: pointer;
}

.common-nav-icons a {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.common-nav-icons a div {
    display: flex;
    justify-content: center;
}

.common-nav-icons a div:first-child span {
    font-size: 32px;
}

.common-nav-icons a div:last-child {
    font-size: var(--font-size-bottom-navigation);
}

/* --break-screen-small */
@media (min-width: 1024px) {
    .common-nav-icons ul {
        display: initial;
        padding: 0;
    }

    .common-nav-icons li {
        padding: 8px;
    }

    .common-nav-icons li:not(:first-child) {
        margin-top: 16px;
    }

    .common-nav-icons li:hover,
    .common-nav-icons {
        border-radius: var(--dim-border-radius-default);
        background-color: var(--color-border);
    }

    .common-nav-icons a div:first-child span {
        font-size: 48px;
    }

    .common-nav-icons a div:last-child {
        margin-top: 6px;
        font-size: var(--font-size-small);
    }
}

/* --------------------------------------- Pagination --------------------------------------- */

.common-pagination {
    display: flex;
    align-items: center;
    padding: 16px 16px;
    background-color: var(--color-background);
}

.common-pagination a {
    display: flex;
    align-items: center;
}

.common-pagination__current {
    display: flex;
    justify-content: center;
    width: 100%;
}

.common-pagination__previous {
    display: flex;
    justify-content: flex-end;
    min-width: 50px;
    margin-right: 10px;
}
.common-pagination__next {
    display: flex;
    justify-content: flex-start;
    min-width: 50px;
}

/* --break-tablet-large */
@media (min-width: 768px) {
    .common-pagination {
        padding: 16px;
    }

    .common-pagination--top {
        border-top-left-radius: var(--dim-border-radius-default);
        border-top-right-radius: var(--dim-border-radius-default);
    }

    .common-pagination--bottom {
        border-bottom-left-radius: var(--dim-border-radius-default);
        border-bottom-right-radius: var(--dim-border-radius-default);
    }
}

/****************************************************************************************
 *                                  Reusable Templates
 ***************************************************************************************/


 /* -------------------------------------- Events ------------------------------------- */

.common-template-events-week-calendar {
    margin-top: 16px;
}

.common-template-events-week-calendar__month {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid rgb(229, 231, 235);
}

.common-template-events-week-calendar__month h3 {
    display: flex;
    align-items: center;
    width: 100%;
}

.common-template-events-week-calendar__month div {
    display: flex;
    align-items: center;
}

.common-template-events-week-calendar__week {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

.common-template-events-week-calendar__week li,
.common-template-events-week-calendar__week li a {
   display: inline-flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   width: 100%;
}

.common-template-events-week-calendar__current-day {
    background-color: var(--color-olympia-emerald);
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto; /* Centers it horizontally */
    position: relative; /* Ensures it doesn’t affect layout */
}

.common-template-events-week-calendar__unselected-day {
    background-color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto; /* Centers it horizontally */
    position: relative; /* Ensures it doesn’t affect layout */
}

.common-template-events-week-calendar__events {
    margin-top: 16px;
    border-top: 1px solid var(--color-border);
}

/* --------------------------------------- Forms -------------------------------------- */

.common-template-forms-select__select {
    display: none;
}

.common-template-forms-select__button button {
    display: flex;
}

.common-template-forms-select__button-label {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.common-template-forms-select ul li span {
    cursor: pointer;
}

/* ------------------------------------- Navigation ----------------------------------- */

.common-template-navigation-bar {
    align-items: center;
}

.common-template-navigation-bar a {
    cursor: pointer;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
