/****************************
 * Appointment Scheduling Section
 ****************************/
 #appointment-scheduling {
  width: 1200px;
  min-height: 85vh;
  margin: 0 auto;
  padding: 10px 0px;
}

#appointment-scheduling h2 {
  text-align: center;
  font-size: 2rem;
  color: gold;
}

/****************************
 * Form Styles
 ****************************/
#appointmentForm {
  background-color: #1c1c1c;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#appointmentForm fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

#appointmentForm legend {
  display: none; /* Hidden as we're using separate headers */
}

.form-step {
  /* Transition for smooth step changes */
  transition: opacity 0.5s ease-in-out;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 20px;
}

.form-column {
  flex: 1;
  min-width: 280px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #fff;
}

.form-group input:not([type]),
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #2980b9;
  outline: none;
}

.required-asterisk {
  color: #e74c3c;
  margin-left: 4px;
  font-weight: bold;
}

/* Error message styling */
.error-message {
  font-size: 0.875rem;
  color: #e74c3c;
  margin-top: 5px;
  display: none;
}

/****************************
 * Horse Information Styles
 ****************************/
#horse-info-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.horse-info-block {
  background-color: #262626;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  flex: 1 1 300px;
}

.horse-info-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: end;
}

.horse-info-columns .form-group {
  margin-bottom: 15px;
}

.horse-info-block .remove-horse-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: #c0392b;
  cursor: pointer;
  transition: color 0.3s;
}

.horse-info-block .remove-horse-btn:hover {
  color: #e74c3c;
}

.conditional-group {
  display: none;
  margin-top: 10px;
}

.laminitis-details,
.special-needs-details {
  margin-top: 10px;
}

.form-group select[name="laminitisHistory[]"]:valid ~ .laminitis-details,
.form-group select[name="specialNeedsHistory[]"]:valid ~ .special-needs-details {
  display: block;
}

.laminitis-details .form-group,
.special-needs-details .form-group {
  margin-bottom: 15px;
}

/* Special styles for file upload */
.form-group input[type="file"] {
  padding: 5px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-add-horse {
  background-color: #27ae60;
  color: #fff;
}

.btn-add-horse:hover {
  background-color: #2ecc71;
}

.btn-next {
  background-color: #2980b9;
  color: #fff;
  display: flex;
  gap: 8px;
}

.btn-next:hover {
  background-color: #3498db;
}

.btn-next[disabled],
.btn-next[disabled]:hover {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.btn-back {
  background-color: #7f8c8d;
  color: #fff;
}

.btn-back:hover {
  background-color: #95a5a6;
}

.btn-submit {
  background-color: #27ae60;
  color: #fff;
}

.btn-submit:hover {
  background-color: #2ecc71;
}

.btn-submit[disabled],
.btn-submit[disabled]:hover {
  background-color: #95a5a6;
  cursor: not-allowed;
}

/****************************
 * Form Navigation Styles
 ****************************/
 .form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Vertically center the buttons */
  margin-top: 10px;
}

.form-navigation button {
  flex: 0 0 auto; /* Prevent buttons from stretching */
}

/* Align "Next" button to the right in Step 1 */
#step-1 .form-navigation {
  justify-content: flex-end;
}

/****************************
 * Disclaimer Styles
 ****************************/
.disclaimer {
  margin-top: 30px;
  font-size: 0.9rem;
  color: #7f8c8d;
  text-align: center;
}

/****************************
 * Calendar App Styles
 ****************************/
#calendar-ui {
  /* Placeholder styling */
  background-color: #ecf0f1;
  padding: 20px;
  border-radius: 8px;
}

.calendar-instructions {
  color: #fff;
  margin-bottom: 20px;
  background-color: #333;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 1rem;
}

/****************************
 * Step 4 summary container
 ****************************/
#review-details {
  background-color: #262626;
  padding: 15px 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Header Styling */
#review-details h4 {
  color: gold;
  font-size: 1.5rem;
  margin-bottom: 10px;
  margin-top: 0px;
}

/* Adjust the Horizontal Rules */
#review-details hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 12px 0;
}

/* Optional: Ensure Headers Are Not Part of Grid */
.review-horses-grid h4 {
  grid-column: 1 / -1; /* Span all columns if accidentally placed */
}

#review-details p {
  font-size: 1rem;
  line-height: 1.6;
  padding-bottom: 12px;
}

/* Container for Client Information in Review */
.review-client-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Individual Columns for Client Information */
.review-client-info .client-info-column {
  flex: 1;
  min-width: 280px;
}

/* Container for Horses in Review */
.review-horses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0px 5px;
}

/* Individual Horse Card in Review */
.review-horse-card {
  background-color: #333;
  padding: 15px;
  border-radius: 8px;
  color: #fff;
}

/* Container for Appointment Slots in Review */
.review-appointments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}

/* Individual Appointment Card */
.review-appointment-card {
  background-color: #333;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  flex: 1 1 calc(33.333% - 20px); /* Three cards per row with gap */
  box-sizing: border-box;
  min-width: 250px; /* Ensures cards don't get too small */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.review-appointment-card p {
  margin: 5px 0;
}

/* Edit Buttons Styling */
#review-details .edit-section {
  background-color: gold;
  color: #000000;
  padding: 10px 15px; /* Adjusted padding */
  border-radius: 5px;
  display: block; /* Ensure buttons are block-level */
  width: auto; /* Allow buttons to size based on content */
  margin: 0px; /* Add vertical spacing */
  font-size: 1rem; /* Ensure readable font size */
  cursor: pointer; /* Ensure pointer cursor */
}

#review-details .edit-section:hover {
  background-color: goldenrod;
}

/* Default: show desktop nav, hide mobile nav */
.desktop-nav {
  display: flex; /* or block, depending on your design */
}

.mobile-nav {
  display: none;
}

/****************************
 * Responsive Design
 ****************************/
@media (max-width: 768px) {
  /* Make the overall container fluid rather than fixed width */
  #appointment-scheduling {
    width: 100%;
    margin: 0 10px;
    padding: 10px;
  }
  
  /* Stack the form rows vertically (if not already done) */
  .form-row {
    flex-direction: column;
    gap: 20px;
  }
  
  /* Make each form column take up the full width */
  .form-column {
    min-width: 100%;
  }
  
  /* For the horse info section, stack blocks and columns vertically */
  #horse-info-container {
    flex-direction: column;
  }
  .horse-info-block {
    flex: 1 1 100%;
  }
  .horse-info-columns {
    grid-template-columns: 1fr;
  }
  
  /* Stack navigation buttons vertically and make them full width */
  .form-navigation {
    flex-direction: column;
    gap: 10px;
  }
  .form-navigation button {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  /* Stack the client info sections vertically */
  .client-info-container {
    flex-direction: column;
  }
  /* On mobile, show only the personal info initially */
  .client-personal {
    display: block;
  }
  .client-address {
    display: none;
  }
  
  /* Hide the desktop navigation buttons */
  .desktop-nav {
    display: none;
  }
  .mobile-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  /* (Optional) Style mobile nav buttons as needed */
  .mobile-nav button {
    width: auto;
    flex: 1;
  }

  .horse-info-desktop {
    display: none;
  }
  .horse-info-mobile {
    display: block;
  }
  /* Style the mobile add button as a square */
  .mobile-add-horse,
  .mobile-horse-square {
    width: 100px;
    height: 100px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid gold;
    border-radius: 8px;
    margin: 5px;
    background-color: #262626;
    color: gold;
    cursor: pointer;
    text-align: center;
  }
  .mobile-horse-square {
    position: relative; /* Allow the delete button to be positioned absolutely */
  }
  .mobile-horse-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    background: transparent;
    border: none;
    color: red;
    font-size: 1.2rem;
    cursor: pointer;
  }
  .mobile-add-horse .plus-icon {
    font-size: 2rem;
    line-height: 1;
  }
  .mobile-add-horse .button-text {
    font-size: 0.9rem;
    margin-top: 4px;
  }
  /* Container for the horse list tiles */
  #mobile-horse-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
  }
  
/* Modal Overlay */
  .horse-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* semi-transparent overlay */
    display: none; /* will be set to flex when shown */
    justify-content: center;
    align-items: center;
    z-index: 2000;
  }

  /* Modal Content – Styled to match the appointment form */
  .horse-info-modal-content {
    background-color: #1c1c1c;            /* same as your form */
    padding: 20px;                        /* adjust as needed */
    border-radius: 10px;                  /* same as your form */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* same shadow as your form */
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    color: #fff;                          /* white text, to contrast the dark background */
    font-family: inherit;                 /* inherit the body font */
  }

  .horse-info-modal input[type="text"],
  .horse-info-modal input[type="number"],
  .horse-info-modal input[type="date"],
  .horse-info-modal select,
  .horse-info-modal textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
  }

  .horse-info-modal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #fff;
  }

  /* Modal Close Button */
  .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }
  /* Modal steps styling */
  .horse-info-modal .modal-step {
    margin-bottom: 20px;
  }
  .modal-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .modal-navigation button {
    flex: 1;
  }
}
/*lenCalendarStyles.css*/
 #calendar-app {
    /* Center on page and take up 80% of viewport */
    margin: 0 auto;
    max-height: 80vh;
  
    /* Visual styles */
    border: 2px solid gold;
    border-radius: 8px;
    box-sizing: border-box;
  
    /* Layout: top nav + weekdays + flexible grid */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevent overflow if window is small */
  }
  
  /**********************************************************
   * NAV BAR
   **********************************************************/
  .calendar-nav {
    color: #000000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
  }
  
  .calendar-nav button {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
  }
  .calendar-nav button:hover {
    background-color: #357ae8;
  }
  
  .current-month-year {
    font-size: 1.2rem;
    font-weight: bold;
  }
  
  /**********************************************************
   * WEEKDAYS HEADER (Sun - Sat)
   **********************************************************/
  .calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    padding: 8px 0;
    background-color: #f5f5f5;
    color: black;
    border-bottom: 1px solid #ddd;
  }
  .weekday {
    padding: 5px;
    font-size: 0.9rem;
  }
  
  /**********************************************************
   * CALENDAR GRID (the 6 possible weeks of day-cells)
   * - We use flex so each "week" is a row of 7 columns.
   * - .calendar-row is the "week," containing 7 day-cells.
   **********************************************************/
  .calendar-grid {
    /* This will expand to fill the remaining vertical space */
    flex: 1;
    display: flex;
    flex-direction: column; /* Each row is stacked vertically */
    gap: 2px;               /* Small gap between rows */
    flex-grow: 1; /* Occupy the remaining space in #calendar-app */
    transition: opacity 0.3s ease-in-out; /* for fade in/out */
  }
  
  /* For fade animations */
  .calendar-grid.fade-out {
    opacity: 0;
  }
  .calendar-grid.fade-in {
    opacity: 1;
  }
  
  /**********************************************************
   * A single "week" row in the grid
   **********************************************************/
   .calendar-row {
        height:12vh;
        display: grid;
        grid-template-columns: repeat(7, 1fr); /* 7 equal columns */
        gap: 2px; /* Gap between day-cells */
    }
  /**********************************************************
   * CALENDAR CELL (one day)
   **********************************************************/
    .calendar-cell {
        flex: 1; /* Ensure the cells fill their container row height */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        border: 1px solid #ddd;
        padding: 10px;
        box-sizing: border-box;
        font-size: 0.9rem;
        cursor: pointer;
        position: relative;
        overflow: visible; /* or at least don't let .calendar-cell or a parent clip it */
        background-color: white;
        color: black;
        width: 100%; /* Ensure the cell scales properly in width */
    }
  
  /* Hover highlight */
  .calendar-cell:hover {
    background-color: #f0f0f0;
  }
  
  /* "Disabled" days (prev/next month overlap) */
  .calendar-cell.disabled {
    font-weight: 600;
    background-color: #b3b3b3;
    color: #000000;
    pointer-events: none;
  }

/**********************************************************
  * Tooltip Popup
**********************************************************/
.cell-tooltip-popup {
  display: none; /* Initially hidden */
  position: absolute; /* Positioned globally */
  width: 200px;
  background-color: white;
  color: black;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  font-size: 0.9rem;
  z-index: 1000;
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.cell-tooltip-popup.above {
  transform: translateY(-15px); /* Add a slight offset for "above" tooltips */
}

.cell-tooltip-popup.below {
  transform: translateY(5px); /* Add a slight offset for "below" tooltips */
}

  /**********************************************************
   * WEEKENDS, Busy, Partial, Full, etc.
   **********************************************************/
  .calendar-cell.weekend {
    background-color: #f1f8ff;
  }
  .calendar-cell.busy {
    background-color: #ffc1c1;
    pointer-events: none;
  }
  .calendar-cell.partial-schedule {
    background-color: #ffcc99; /* Light orange for partially booked days */
  }
  .calendar-cell.full-schedule {
    background-color: #ff9999; /* Red for fully booked days */
    color: white;
  }
  
  /* Additional indicator if day has any appointments */
  .calendar-cell.has-appointments {
    border: 2px dotted #ffc1c1;
  }

  .calendar-cell.proximity-green {
    background-color: #d4edda; /* Light green */
    color: #155724;
  }
  
  .calendar-cell.proximity-red {
    background-color: #f8d7da; /* Light red */
    color: #721c24;
  }
  
  /**********************************************************
   * CITY LABELS (stacked vertically at the bottom)
   **********************************************************/
  .day-city-labels {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: center; /* center horizontally */
    gap: 2px;
    font-size: 0.9rem;
    font-weight: 600;
  }
  
  /* City "badge" */
  .city-badge {
    background-color: #ffebcc;
    color: #333;
    padding: 2px 4px;
    border-radius: 4px;
    white-space: nowrap;
  }

  .day-selected-labels {
    display: flex;
    flex-direction: column; /* stack vertically */
    gap: 2px;               /* small spacing between lines */
    align-items: center;    /* or flex-start, if you prefer left alignment */
  }
  
  .selected-slot-badge {
    display: block;   /* ensures each badge is on its own line */
    background-color: #e7f3ff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
  }
  
  /**********************************************************
   * TIME SLOT POPUP
   **********************************************************/
  .time-slot-popup {
    position: absolute;
    width: 250px;
    background-color: white;
    color: black;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 1000;
    display: none;
  }
  
  .time-slot-popup h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
  }
  
  .time-slot-popup .time-slot {
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 5px;
  }
  .time-slot-popup .time-slot.busy {
    background-color: #ffc1c1;
    cursor: not-allowed;
  }
  .time-slot-popup .time-slot:hover:not(.busy) {
    background-color: #f0f0f0;
  }

  /* Highlight selected time-slot */
  .time-slot.selected {
    background-color: #27ae60 !important;
    color: #fff;
    font-weight: bold;
  }

  /* If you want to highlight the entire date cell in the calendar-grid */
  .calendar-cell.selected-date {
    background-color: #2ecc71;
    color: #fff;
  }

  /* Adjust the vertical alignment */
.time-slot-popup.above {
  transform: translateY(-15px); /* Slight offset for "above" tooltips */
}

.time-slot-popup.below {
  transform: translateY(5px); /* Slight offset for "below" tooltips */
}

/*********************************************************
 * Mobile Overrides for Calendar Plugin
 * Applies only when the viewport is 575.98px or less
 *********************************************************/
 @media (max-width: 575.98px) {
  /* Ensure the calendar container never overflows horizontally */
  #calendar-app {
    width: 100%;
    margin: 10px auto;      /* Some margin for breathing room */
    border-width: 1px;      /* Thinner border for smaller screens */
    padding: 5px;           /* Less padding for a compact look */
    overflow-x: hidden;     /* Prevent horizontal scrolling */
  }
  
  /* Adjust the calendar navigation bar */
  .calendar-nav {
    padding: 0 5px;
  }
  .calendar-nav button {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
  .current-month-year {
    font-size: 1rem;
  }
  
  /* Weekdays header: reduce font size and padding */
  .calendar-weekdays {
    font-size: 0.75rem;
    padding: 4px 0;
  }
  .weekday {
    padding: 3px;
    font-size: 0.7rem;
  }
  
  /* Calendar grid rows: reduce row height */
  .calendar-row {
    height: 10vh; /* Adjusted from 12vh */
  }
  
  /* Calendar cells: reduce padding and font size, and force text to not overflow */
  .calendar-cell {
    padding: 4px 2px;
    font-size: 0.6rem;
    align-items: flex-start;
    /* Force uniform cell widths: with grid-template-columns in the row, each cell is 1fr.
       But if content were to force expansion, these rules will prevent it. */
    overflow: hidden;          /* Cut off any overflow */
    white-space: nowrap;       /* Prevent wrapping */
    text-overflow: ellipsis;   /* Show an ellipsis if text is too long */
  }
  
  /* Also force any labels or badges inside cells to obey the width */
  .day-city-labels,
  .selected-slot-badge {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* Make sure the badge itself is a block element that takes full width */
  .city-badge {
    display: block;
    width: 100%;
  }
  
  /* Tooltips: make them smaller for mobile screens */
  .cell-tooltip-popup {
    width: 150px;
    font-size: 0.75rem;
  }
  
  /* Time slot popup: adjust dimensions and font size */
  .time-slot-popup {
    width: 170px;
    font-size: 0.75rem;
  }
}
