:root {
  --bg: #000000;
  --surface: #1a1a1a;
  --text: #ffffff;
  --muted: #cccccc;
  --brand: #c8f444;
  --danger: #f44336;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Sora', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  background: var(--bg);
  color: var(--text);
}

.container { 
  max-width: 980px; 
  margin: 0 auto; 
  padding: 16px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .container {
    padding: 24px;
  }
}

.grid { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 20px; 
  justify-content: center;
  align-items: start;
}

@media (min-width: 768px) {
  .grid { 
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
    gap: 24px; 
  }
}

h1 { 
  font-weight: 700; 
  margin: 16px 0 4px; 
  color: var(--brand);
}
h2 { font-weight: 600; margin: 0 0 12px; color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.back-link {
  display: inline-block;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  margin-top: 10px;
  transition: color 0.3s;
}

.back-link:hover {
  color: #a8d434;
}

.card {
  background: var(--surface);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  min-height: fit-content;
  width: 100%;
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .card {
    margin-bottom: 0;
  }
}

.row { 
  display: grid; 
  gap: 8px; 
  margin: 12px 0; 
}

label { 
  color: var(--muted); 
  font-size: 12px; 
  font-weight: 500;
}

input, select, textarea {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Sora', Arial, sans-serif;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

@media (min-width: 768px) {
  input, select, textarea {
    padding: 10px 12px;
    font-size: 13px;
  }
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
}

/* Search input styling */
#show-search {
  background: var(--surface);
  color: var(--text);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'Sora', Arial, sans-serif;
  transition: border-color 0.3s;
}

#show-search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(200, 244, 68, 0.2);
}

#show-search::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

/* Style disabled options in select dropdowns */
select option:disabled {
  color: #666;
  font-style: italic;
  background-color: rgba(255, 255, 255, 0.1);
}

select option:disabled::after {
  content: " (Contact residents@subtleradio.com)";
}

.btn {
  background: var(--brand);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Sora', Arial, sans-serif;
  font-size: 14px;
  transition: background 0.3s;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px; /* Better touch target for mobile */
}

@media (min-width: 768px) {
  .btn {
    padding: 10px 16px;
    font-size: 13px;
    width: auto;
    min-height: auto;
  }
}

.btn:hover {
  background: #a8d434;
}

.btn[disabled] { 
  opacity: 0.5; 
  cursor: not-allowed; 
  background: #666;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border-top-color: #000;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #333;
}

.modal-content h3 {
  margin: 0 0 16px 0;
  color: var(--brand);
  font-size: 20px;
}

.warning-box {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.warning-box p {
  margin: 0 0 12px 0;
  color: #ffc107;
}

.warning-box ul {
  margin: 12px 0;
  padding-left: 20px;
}

.warning-box li {
  margin: 8px 0;
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal-actions .btn {
  min-width: 120px;
}

.list { list-style: none; padding: 0; margin: 12px 0 0; max-height: 280px; overflow: auto; }
.list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border-bottom: 1px dashed #333; }
.slot-pick { background: transparent; border: 1px solid var(--brand); color: var(--brand); padding: 6px 10px; border-radius: 6px; cursor: pointer; }

.warning { 
  background: rgba(244,67,54,0.12); 
  border: 1px solid rgba(244,67,54,0.35); 
  color: #ffd2d2; 
  padding: 8px 12px; 
  border-radius: 8px; 
  margin-bottom: 12px;
}

.warning strong {
  color: #ff6b6b;
}

.warning small {
  color: #ffb3b3;
  font-style: italic;
}

/* Show timing warning - different color to distinguish from booking window warning */
#show-timing-warning {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: #fff3cd;
}

#show-timing-warning strong {
  color: #ffc107;
}

#show-timing-warning small {
  color: #ffeaa7;
  font-style: italic;
}

.info-box {
  background: rgba(200, 244, 68, 0.1);
  border: 1px solid rgba(200, 244, 68, 0.3);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.info-box p {
  margin: 0;
}

.info-box a {
  color: var(--brand);
  text-decoration: underline;
}

.info-box a:hover {
  color: #a8d434;
}
.duration-info { 
  background: rgba(200, 244, 68, 0.1); 
  border: 1px solid rgba(200, 244, 68, 0.3); 
  color: var(--brand); 
  padding: 8px 12px; 
  border-radius: 8px; 
  font-weight: 500;
}
.result { margin-top: 12px; padding: 10px; border-radius: 8px; border: 1px solid #333; background: var(--surface); }

#slot-hint {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(200,244,68,0.08);
  border: 1px solid rgba(200,244,68,0.2);
}

#slot-hint strong {
  color: var(--brand);
}

/* Filter Styles */
.filters {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .filter-row {
    grid-template-columns: 1fr 1fr;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.date-inputs {
  display: flex;
  gap: 8px;
}

.date-inputs input {
  flex: 1;
  font-size: 12px;
  padding: 8px 10px;
}

.filter-actions {
  display: flex;
  gap: 8px;
  justify-content: stretch;
  flex-direction: column;
}

@media (min-width: 768px) {
  .filter-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

.btn-small {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  min-height: 44px;
}

@media (min-width: 768px) {
  .btn-small {
    padding: 6px 12px;
    font-size: 12px;
    min-height: auto;
  }
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid #333;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Status indicators */
.status-pending { color: var(--brand); font-weight: 600; }
.status-approved { color: #4caf50; font-weight: 600; }
.status-denied { color: var(--danger); font-weight: 600; }
.status-cancelled { color: var(--muted); font-weight: 600; }

/* Small buttons */
.btn.small {
  padding: 6px 12px;
  font-size: 12px;
  margin: 2px;
}

/* Error styling */
.error {
  background: rgba(244,67,54,0.12);
  border: 1px solid rgba(244,67,54,0.35);
  color: #ffd2d2;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 12px;
}

/* Loading states */
.loading {
  text-align: center;
  color: var(--brand);
  font-style: italic;
  padding: 20px;
}

.loading::before {
  content: "⏳ ";
  margin-right: 8px;
}

/* Mobile-specific improvements */
@media (max-width: 767px) {
  body {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  h1 {
    font-size: 24px;
    margin: 12px 0 8px;
  }
  
  h2 {
    font-size: 18px;
    margin: 0 0 16px;
  }
  
  .card {
    padding: 20px;
    margin-bottom: 24px;
  }
  
  .filters {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .info-box {
    padding: 16px;
    font-size: 14px;
  }
  
  .warning {
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .list {
    max-height: 200px;
  }
  
  .list li {
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .slot-pick {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Ensure proper stacking and prevent overlapping */
.card + .card {
  margin-top: 0;
}

.filters + .row {
  margin-top: 0;
}

/* Fix any potential z-index issues */
.warning, .info-box {
  position: relative;
  z-index: 2;
}


