/* -----------------------------------------------------------
   GLOBAL RESET + BASE TYPOGRAPHY
----------------------------------------------------------- */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: "Aptos", "Calibri", "Arial", sans-serif;
  background: #ffffff;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  color: #222;
  line-height: 1.6;
}

/* VISIBILITY */
.hidden { display: none !important; }

/* -----------------------------------------------------------
   FINAL FORM TYPOGRAPHY
----------------------------------------------------------- */
label {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 6px;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 18px;
  font-size: 1.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  margin-bottom: 14px;   /* universal compact spacing */

}

/* -----------------------------------------------------------
   FINAL FORM TYPOGRAPHY
----------------------------------------------------------- */
label {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 6px;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 18px;
  font-size: 1.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  margin-bottom: 25px;
}

/* ⭐ FIX: Make single-resident name match checkbox label size */
.resident-name {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 20px;
}
/* Textarea fields (WCAG compliant, compact height) */
textarea {
  min-height: 48px;          /* WCAG touch target */
  max-height: 120px;         /* Prevents oversized boxes */
  padding: 10px 12px;
  font-size: 1.2rem;         /* WCAG large text */
  resize: vertical;          /* User can expand if needed */
  border-radius: 6px;
  width: 100%;               /* Match other form fields */
  box-sizing: border-box;    /* Prevents overflow */
}
/* Compact Unit Number input (Absence + Maintenance) */
input.unit-input {
  height: 48px;               /* WCAG minimum touch target */
  padding: 8px 12px;          /* Reduced padding */
  font-size: 1.2rem;          /* WCAG large text */
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}
/* Tighten spacing on Absence + Maintenance screens */
.form-group {
  margin-bottom: 14px;     /* Reduced from ~22px */
}

/* Unit input + Lookup button spacing */
.unit-input {
  margin-bottom: 8px;      /* Tight gap before lookup */
}

.lookup-btn {
  margin-top: 0;           /* Remove extra space above */
}

/* Textarea to Submit button spacing */
textarea {
  margin-bottom: 14px;     /* Tight but readable */
}

/* Submit to Return button spacing */
button.primary {
  margin-bottom: 12px;     /* Reduced gap before Return */
}

/* -----------------------------------------------------------
   FORM CONTAINER
----------------------------------------------------------- */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 12px !important;   /* much tighter */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 9px rgba(0,0,0,0.08);
}

/* -----------------------------------------------------------
   SCREEN
----------------------------------------------------------- */
.screen {
  position: relative;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 999;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ccc;
  border-top-color: #2E7D32;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.success-banner {
  background: #2E7D32;
  color: white;
  padding: 18px;
  text-align: center;
  font-size: 1.6rem;
  border-radius: 6px;
  margin: 20px auto;
  max-width: 600px;
  display: none;
}

.screen {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  min-height: 100vh;
}

@media (min-width: 800px) {
  .screen {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* -----------------------------------------------------------
   BUTTONS — AVEO GREEN
----------------------------------------------------------- */
button.primary,
button.secondary {
  width: 100%;
  background-color: #2E7D32;
  color: white;
  border: none;
  padding: 22px;
  font-size: 2.0rem;
  border-radius: 8px;
  cursor: pointer;
}

button.primary:active,
button.secondary:active {
  background-color: #1B5E20;
}
.btn-secondary {
  background-color: #cccccc;
  color: #222;
  padding: 22px;
  border: none;
  border-radius: 12px;
  font-size: 2.0rem;
  width: 100%;
  font-family: 'Aptos', sans-serif;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #b5b5b5;
}

.form-buttons {
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.btn-return {
  background-color: #2E7D32;   /* Aveo Green */
  color: #ffffff;
  border: none;
  padding: 16px 20px;          /* Larger touch target */
  width: 100%;                 /* Full width */
  border-radius: 6px;
  font-size: 1.25rem;          /* WCAG large text */
  margin-top: 18px;
  display: block;              /* Ensures 100% width works */
}


/* -----------------------------------------------------------
   CHEF SPECIALS VIEW
----------------------------------------------------------- */
.specials-box {
  background: #ffffff;
  border: 2px solid #4CAF50;
  padding: 16px;
  border-radius: 12px;
  font-size: 1.2rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.week-heading {
  font-weight: bold;
  margin-bottom: 12px;
  color: #2e7d32;
  font-size: 1.3rem;
}

.specials-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.specials-list li {
  margin-bottom: 10px;
}

.aveo-title {
  color: #2e7d32;
  font-size: 1.6rem;
  margin-bottom: 20px;
  text-align: center;
}

/* -----------------------------------------------------------
   LOOKUP BUTTON — UNIFIED STYLE FOR ALL SCREENS
----------------------------------------------------------- */
.lookup-btn {
  background-color: #2E7D32;   /* Aveo Green */
  color: #ffffff;
  border: none;
  padding: 16px 20px;          /* Larger touch target */
  width: 100%;                 /* Full width */
  border-radius: 6px;
  font-size: 1.25rem;          /* WCAG large text */
  margin-top: 18px;
  display: block;              /* Ensures 100% width works */
}

.lookup-btn:hover {
  background-color: #276c2c;
}

/* -----------------------------------------------------------
   REQUEST TYPE SCREEN
----------------------------------------------------------- */
.button-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

.button-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-action {
  background-color: #2E7D32;
  color: #FFFFFF;
  padding: 18px;
  border: none;
  border-radius: 12px;
  font-size: 1.25rem;
  width: 100%;
  font-family: 'Aptos', sans-serif;
}

.btn-info {
  background-color: #1BA39C;
  color: #FFFFFF;
  padding: 18px;
  border: none;
  border-radius: 12px;
  font-size: 1.25rem;
  width: 100%;
  font-family: 'Aptos', sans-serif;
  opacity: 0.95;
}

.btn-action:hover,
.btn-info:hover {
  opacity: 0.85;
}

@media (min-width: 720px) {
  .button-grid {
    flex-direction: row;
    justify-content: space-between;
  }

  .button-column {
    width: 48%;
  }
}

/* ---------------------------------------
   SPINNER
--------------------------------------- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid #ccc;
  border-top-color: #4CAF50;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== Special Events Step 2 — Event Cards ===== */

.event-card-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.event-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  background: #f9f9f9;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.event-card:hover {
  background: #f1f1f1;
  border-color: #999;
}

.event-card.selected {
  border-color: #2E7D32;
  background: #e8f5e9;
}

.event-card-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tick-icon {
  font-size: 1.2em;
  color: #2E7D32;
}

.hidden {
  display: none;
}

.event-card-detail {
  font-size: 0.95em;
  margin-bottom: 4px;
}
/* ============================================================
   GLOBAL FULL-SCREEN SPINNER OVERLAY
   ============================================================ */
#globalSpinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#globalSpinner.hidden {
  display: none !important;
}
.large-spinner {
  width: 80px;
  height: 80px;
  border: 10px solid #ccc;
  border-top-color: #2e7d32;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   DUPLICATE BOOKING BANNER
   ============================================================ */
.duplicate-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #c62828;
  color: white;
  padding: 15px 25px;
  border-radius: 6px;
  font-size: 18px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
<!-- SWITCHBOARD STYLES -->
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

button {
    padding: 14px;
    font-size: 16px;
    border-radius: 6px;
    border: none;
    background: #2b6cb0;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #2c5282;
}
/* -----------------------------------------------------------
   SWITCHBOARD LAYOUT
----------------------------------------------------------- */

.switchboard-title {
  font-size: 2.4rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: #2E7D32;
}

.switchboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.switchboard-btn {
  background-color: #2E7D32;
  color: white;
  padding: 20px;
  border: none;
  border-radius: 10px;
  font-size: 1.6rem;
  cursor: pointer;
  text-align: center;
}

.switchboard-btn:hover {
  background-color: #1B5E20;
}

/* ⭐ Reduce vertical spacing between switchboard buttons */
.switchboard .button-column button {
    margin-bottom: 10px;   /* was ~20–25px depending on class */
}

.switchboard-section-title {
  font-size: 1.8rem;
  margin-top: 30px;
  margin-bottom: 10px;
  font-weight: bold;
  color: #333;
}
/* --- UVAS FORM SPACING FIXES --- */

/* Compact spacing for all inputs */
input[type="text"],
input[type="number"],
input[type="date"],
textarea,
select {
  margin-bottom: 14px;
}

/* Unit input spacing */
input.unit-input {
  margin-bottom: 8px !important;
}

/* Lookup button spacing */
.lookup-btn {
  margin-top: 0 !important;
}

/* Textarea spacing */
textarea {
  margin-bottom: 14px !important;
}

/* Submit button spacing */
.btn-action {
  margin-bottom: 12px !important;
}
/* --- UVAS FORM SPACING FIXES (SAFE OVERRIDES) --- */

/* Reduce spacing between form fields */
.form-group {
  margin-bottom: 12px !important;
}

/* Reduce spacing between Unit input and Lookup button */
#abs-unit,
#mnt-unit {
  margin-bottom: 8px !important;
}

/* Remove excess space above Lookup button */
.lookup-btn {
  margin-top: 0 !important;
}

/* Reduce spacing between textarea and Submit */
textarea.text-input {
  margin-bottom: 12px !important;
}

/* Reduce spacing between Submit and Return */
.form-buttons button.btn-return:first-child {
  margin-bottom: 10px !important;
}
/* Remove excess spacing inside form-buttons container */
.form-buttons {
  margin-top: 0 !important;
  gap: 10px !important;     /* clean, consistent spacing between buttons */
  display: flex !important;
  flex-direction: column !important;
}
/* Tighten Submit → Return spacing */
.form-buttons {
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;   /* reduced from 10px */
}
/* --- FINAL INPUT HEIGHT FIX --- */

/* Reduce height of all text-input fields */
.text-input {
  padding: 10px 12px !important;     /* was 18px */
  font-size: 1.3rem !important;      /* WCAG large text, not oversized */
  margin-bottom: 12px !important;    /* was 25px */
  height: 44px !important;           /* perfect WCAG touch target */
  box-sizing: border-box !important;
}

/* Date inputs need slightly more height for the calendar icon */
input[type="date"].text-input {
  height: 46px !important;
}

/* Textarea stays flexible but compact */
textarea.text-input {
  min-height: 48px !important;
  max-height: 120px !important;
  padding: 10px 12px !important;
  font-size: 1.3rem !important;
}
/* --- Compact resident dropdown (single-resident + multi-resident) --- */
select#abs-name,
select#mnt-name,
select.text-input {
  height: 40px !important;          /* compact but WCAG-safe */
  padding: 6px 10px !important;     /* reduced padding */
  font-size: 1.2rem !important;     /* smaller, appropriate text */
  margin-bottom: 10px !important;   /* tighter spacing */
  box-sizing: border-box !important;
}
/* BASE SWITCHBOARD BUTTON */
.switchboard-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 6px;
    font-size: 1.4rem;
    border: none;
    display: block;
    margin-bottom: 14px;
    color: white;
}

/* ACTION BUTTONS (Left Column) — Aveo Green */
.switchboard-btn.action {
    background-color: #2E7D32;
}

/* VIEW-ONLY BUTTONS (Right Column) — Teal */
.switchboard-btn.view {
    background-color: #00838F;
}

/* COMMITTEE BUTTONS — Light Aveo Green */
.switchboard-btn.committee {
    background-color: #A5D6A7;   /* Light green */
    color: #1B5E20;              /* Dark green text for contrast */
}
.pin-label {
  font-size: 1.2rem;
  margin-bottom: 6px;
  display: block;
}

.pin-input {
  font-size: 1.6rem;        /* WCAG text size */
  padding: 14px 16px;       /* WCAG touch target */
  height: 52px;             /* Ensures 44px minimum */
  margin-bottom: 18px;
}
