/* ===================================================================
   LEEFHub – Bookings & Calendar (Frontend)
=================================================================== */


/* ===================================================================
   1. SAFE CALENDAR ROOT (FullCalendar MUST control layout)
=================================================================== */
#leefhub-calendar {
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto;
  position: relative;
}

/* FullCalendar controls internal scrolling — DO NOT override height */
.fc-scroller {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Hide daygrid in timeGridDay only (correct scoping) */
.fc-view-timeGridDay .fc-daygrid-body {
  display: none;
}


/* ===================================================================
   2. CLEAN FULLCALENDAR UI
=================================================================== */

/* Remove graphic dot in list view */
.fc-list-event-graphic {
  display: none;
}

/* Remove left time column (list view) */
.fc-list-event-time {
  display: none;
}

.fc-list-event-title {
  padding-left: 0;
}

/* Remove all-day row background */
#leefhub-calendar .fc-timegrid-all-day,
#leefhub-calendar .fc-timegrid-divider {
  background: transparent;
  border: none;
}


/* ===================================================================
   3. EVENT “PILL” DESIGN
=================================================================== */

.fc-event {
  background: var(--lh-cal-bg);
  color: var(--lh-cal-text);
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 0;

  /* Center content */
  display: flex;
  flex-direction: column;
  align-items: center !important;
  justify-content: center;

  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: 0.2s ease;

  font-size: 0.9rem;
  line-height: 1.4;

  /* Allow wrapping */
  white-space: normal;
  text-overflow: ellipsis;

  /* Allow pill to grow vertically */
  height: auto !important;
  overflow: visible !important;
}

.fc-event:hover {
  background: var(--lh-cal-hover);
  transform: translateY(-2px);
}

/* Title */
.fc-event .event-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;

  text-align: center !important;
  width: 100%;
  white-space: normal !important;
  line-height: 1.25em;
}

/* Time */
.fc-event .event-time {
  font-size: 0.85rem;
  opacity: 0.9;

  text-align: center !important;
  width: 100%;
  white-space: normal !important;
  line-height: 1.25em;
}

/* Prevent FullCalendar from forcing fixed-height wrappers */
.fc-daygrid-event-harness {
  height: auto !important;
}

/* Improve spacing inside event pill on month view */
.fc .fc-daygrid-event {
  padding: 4px 6px !important;
  line-height: 1.25em;
}

/* ===================================================================
   4. FULLCALENDAR TOOLBAR
=================================================================== */
.fc-toolbar.fc-header-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 6px 2px;
}

.fc-toolbar-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}

.fc .fc-button {
  background: var(--lh-cal-bg) !important;
  color: var(--lh-cal-text) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  transition: background 0.2s ease, transform 0.15s ease;
}

.fc .fc-button-group {
  gap: 8px !important;
}

.fc .fc-button:hover,
.fc .fc-button.fc-button-active {
  background: var(--lh-cal-hover) !important;
  transform: translateY(-1px);
}

.fc .fc-button:disabled {
  background: #ccc !important;
  color: #666 !important;
}

/* ===================================================================
   5. LIST VIEW IMPROVEMENTS (Spacing & Structure)
=================================================================== */

/* Day header styling */
.fc-list-day {
  background: #f7f7f7;
  border-bottom: 1px solid #e2e2e2;
  padding: 12px 14px;
}

.fc-list-day-text {
  font-weight: 700;
  font-size: 1rem;
}

.fc-list-day-side-text {
  font-size: 0.9rem;
  color: #555;
}

/* Space around list rows */
.fc-list-table .fc-list-event {
  padding: 12px 0;
}

/* Spacing between event pill and container edges */
.fc-list-event .fc-event {
  margin: 6px 10px;
}

/* Space between day groups */
.fc-list-day + .fc-list-table {
  margin-top: 14px;
}

/* Reduce table padding for a cleaner list structure */
.fc-list-table td {
  padding: 0;
}


/* ===================================================================
   6. EVENT LIST / GRID (Legacy LeefHub Cards)
=================================================================== */
.leefhub-events-grid {
  display: block;
  margin: 2rem 0;
}

.leefhub-card.leef-event {
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.leefhub-card-body {
  padding: 16px;
}

.leefhub-card-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.leefhub-card-time {
  color: #666;
  margin: 0;
}

.leefhub-card-footer {
  border-top: 1px solid #eee;
  padding: 12px 16px;
  text-align: right;
}


/* ===================================================================
   7. BOOKING BUTTONS
=================================================================== */
.leefhub-book-btn,
.leefhub-card-button {
  background: var(--lh-cal-bg);
  color: var(--lh-cal-text);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 600;
  display: inline-block;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.leefhub-book-btn:hover,
.leefhub-card-button:hover {
  background: var(--lh-cal-hover);
  transform: translateY(-1px);
}


/* ===================================================================
   8. BOOKING FORM
=================================================================== */
.leefhub-booking-form {
  max-width: 700px;
  border-radius: 12px;
  padding: 12px;
  font-size: 17px;
  line-height: 1.6;
  color: #333;
}


/* ===================================================================
   9. BOOKING LIST (Dashboard)
=================================================================== */
.leefhub-bookings-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.booking-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--lh-surface);
  border: 1px solid var(--lh-border);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: background 0.25s ease;
}

.booking-row:hover {
  background: var(--lh-bg);
}


/* ===================================================================
   10. RESPONSIVE
=================================================================== */
@media (max-width: 600px) {
  .fc-toolbar.fc-header-toolbar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .fc-toolbar-chunk {
    width: 100%;
    text-align: center;
  }

  .fc-event {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .fc-button {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
}

/* ===================================================================
   11. RESPONSIVE BOOKING FORM (LeefHub)
   Applies to:
   - Dropdown booking selection
   - Event details booking page
   Safe to include at bottom of bookings.css
=================================================================== */

/* Base adjustments */
.leefhub-booking-form {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
}

.leefhub-booking-title {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 12px;
}

.leefhub-booking-time {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #666;
}

.leefhub-booking-description p {
    margin-bottom: 1rem;
}

/* Form row: Desktop / Tablet Default */
.leefhub-form-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.leefhub-form-row label {
    flex: 0 0 130px;
    font-weight: 600;
    font-size: 1rem;
}

.leefhub-form-row input,
.leefhub-select {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
}

/* CTA buttons */
.leefhub-book-btn {
    width: 100%;
    text-align: center;
    margin-top: 12px;
}


/* ===============================================================
   Tablet Responsive (<= 900px)
=============================================================== */
@media (max-width: 900px) {

    /* Reduce global padding */
    .leefhub-booking-form {
        padding: 20px;
    }

    /* Reduce label width */
    .leefhub-form-row label {
        flex: 0 0 110px;
        font-size: 0.95rem;
    }

    /* Slightly smaller title */
    .leefhub-booking-title {
        font-size: 1.7rem;
    }

    .leefhub-booking-time {
        font-size: 1rem;
    }
}


/* ===============================================================
   Mobile Responsive (<= 600px)
=============================================================== */
@media (max-width: 600px) {

    /* Stack fields vertically */
    .leefhub-form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .leefhub-form-row label {
        flex: unset;
        width: 100%;
        font-size: 0.95rem;
    }

    .leefhub-form-row input,
    .leefhub-select {
        width: 100%;
    }

    /* Booking description and user box */
    .leefhub-booking-user {
        padding: 12px;
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    /* Title and time scaling */
    .leefhub-booking-title {
        font-size: 1.5rem;
        text-align: left;
    }

    .leefhub-booking-time {
        font-size: 0.95rem;
    }

    /* CTA buttons full width on mobile */
    .leefhub-book-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 8px;
    }
}


/* ===============================================================
   Small Mobile (<= 400px)
=============================================================== */
@media (max-width: 400px) {
    .leefhub-booking-title {
        font-size: 1.35rem;
    }
    .leefhub-booking-time {
        font-size: 0.9rem;
    }
    .leefhub-form-row {
        margin-bottom: 20px;
    }
}