/* ===== GENERAL ===== */

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #ffffff !important;   /* REMOVE gray/pink background */
  height: auto !important;          /* Prevent extra vertical space */
  min-height: 0 !important;
}

.app-container {
  max-width: 1400px;
  margin: 0 auto;
  background: #ffffff;              /* Ensure white behind calendar */
  padding-bottom: 0;
}

/* ===== HEADER ===== */

.app-header {
  background: #ffffff;
  padding: 20px;
  border-bottom: 1px solid #ddd;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.controls-row {
  margin-top: 10px;
}

/* ===== LEGEND ===== */

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-label {
  font-weight: bold;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  color: #fff;
  border-left: 10px solid transparent;
}

/* Practice Available */
.legend-availability-practice {
  background-color: #6FCF97;
  border-left-color: #4CAF50;
}

/* Game-Only Availability */
.legend-availability-game-only {
  background-color: #A8D5BA;
  border-left-color: #7FBF99;
  color: #000;
}

/* Scheduled Practice */
.legend-practice {
  background-color: #9E9E9E;
  border-left-color: #7A7A7A;
}

/* Scheduled Game */
.legend-game {
  background-color: #4A6FA5;
  border-left-color: #3A5A85;
}

/* Block */
.legend-block {
  background-color: #F7D154;
  border-left-color: #D6A738;
  color: #000;
}

/* Closure */
.legend-closure {
  background-color: #C0392B;
  border-left-color: #922B21;
}

/* ===== AVAILABILITY COLORS ===== */

.avail-practice {
  background-color: #6FCF97 !important;
  border-color: #4CAF50 !important;
}

.avail-game-only {
  background-color: #A8D5BA !important;
  border-color: #7FBF99 !important;
}

/* ===== EVENTS (BASE CLASSES) ===== */

.practice-event {
  background-color: #9E9E9E !important;
  border-color: #7A7A7A !important;
}

.game-event {
  background-color: #4A6FA5 !important;
  border-color: #3A5A85 !important;
}

.block-event {
  background-color: #F7D154 !important;
  border-color: #D6A738 !important;
}

.closure-event {
  background-color: #C0392B !important;
  border-color: #922B21 !important;
}

/* ===== FULLCALENDAR OVERRIDES ===== */

.fc-event.avail-practice {
  background-color: #6FCF97 !important;
  border-color: #4CAF50 !important;
  color: #000 !important;
}

.fc-event.avail-game-only {
  background-color: #A8D5BA !important;
  border-color: #7FBF99 !important;
  color: #000 !important;
}

.fc-event.practice-event {
  background-color: #9E9E9E !important;
  border-color: #7A7A7A !important;
  color: #000 !important;
}

.fc-event.game-event {
  background-color: #4A6FA5 !important;
  border-color: #3A5A85 !important;
  color: #fff !important;
}

.fc-event.block-event {
  background-color: #F7D154 !important;
  border-color: #D6A738 !important;
  color: #000 !important;
}

.fc-event.closure-event {
  background-color: #C0392B !important;
  border-color: #922B21 !important;
  color: #fff !important;
}

.fc-event:hover {
  filter: brightness(1.05);
}

/* ===== PRACTICE PANEL (unused but kept for safety) ===== */

#practiceActionPanel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  background: #ffffff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  padding: 24px;
  z-index: 9999;
  transition: bottom 0.35s ease;
  max-height: 70vh;
  overflow-y: auto;
}

#practiceActionPanel.open {
  bottom: 0;
}

#practiceActionPanel::before {
  content: "";
  width: 40px;
  height: 5px;
  background: #ccc;
  border-radius: 3px;
  display: block;
  margin: 0 auto 12px;
}

.practice-close-btn {
  display: block;
  margin: 20px auto 0;
  padding: 10px 20px;
  background: #444;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.practice-close-btn:hover {
  background: #222;
}

/* ===== MOBILE POPOVER ===== */

#fc-custom-popover {
  position: absolute;
  z-index: 9999;
  min-width: 220px;
  max-width: 280px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  overflow: hidden;
}

#fc-custom-popover.fc-popover-hidden {
  display: none;
}

.fc-popover-header {
  padding: 8px 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#fc-popover-body {
  padding: 10px 12px;
  white-space: pre-wrap;
  font-size: 13px;
}

#fc-popover-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
}

/* ===== FIELD LAYERS ===== */

.field-layer-item {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  font-size: 14px;
}

.field-layer-item input {
  margin-right: 4px;
}

/* ===== REQUEST HELP LINK ===== */

#requestHelpLink {
  font-size: 0.85rem;
  font-style: italic;
  margin: 8px 0 12px 4px;
  opacity: 0.75;
}

#requestHelpLink a {
  color: #333;
  text-decoration: underline;
  cursor: pointer;
}

#requestHelpLink a:hover {
  opacity: 1;
}
