:root {
  --background: 0, 0%, 100%;
  --foreground: 240, 10%, 3.9%;
  --card: 0, 0%, 100%;
  --card-foreground: 240, 10%, 3.9%;
  --popover: 0, 0%, 100%;
  --popover-foreground: 240, 10%, 3.9%;
  --primary: 240, 5.9%, 10%;
  --primary-foreground: 0, 0%, 98%;
  --secondary: 240, 4.8%, 95.9%;
  --secondary-foreground: 240, 5.9%, 10%;
  --muted: 240, 4.8%, 95.9%;
  --muted-foreground: 240, 3.8%, 46.1%;
  --accent: 240, 4.8%, 95.9%;
  --accent-foreground: 240, 5.9%, 10%;
  --destructive: 0, 84.2%, 60.2%;
  --destructive-foreground: 0, 0%, 98%;
  --border: 240, 5.9%, 90%;
  --input: 240, 5.9%, 90%;
  --ring: 240, 5.9%, 10%;
  --radius: 0.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
}

/* Shadcn-like Components */
.card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid rgb(229, 231, 235); /* Fallback border */
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.input {
  display: block;
  width: 100%;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid #e5e7eb; /* Fallback */
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
  color: inherit;
}

.input:focus {
  outline: none;
  border-color: hsl(var(--ring));
}

.label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  margin-bottom: 0.5rem;
  display: block;
}

.btn-shadcn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0 1rem;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-shadcn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-shadcn-primary:hover {
  opacity: 0.9;
}

.btn-shadcn-outline {
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-shadcn-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.hidden {
  display: none;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.w-full { width: 100%; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }

.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }

.text-sm { font-size: 0.875rem; }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.font-bold { font-weight: 700; }
.tracking-tight { letter-spacing: -0.025em; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

.bg-destructive { background-color: hsl(var(--destructive)); }
.text-destructive-foreground { color: hsl(var(--destructive-foreground)); }
.hover\:bg-destructive:hover { background-color: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }

.h-7 { height: 1.75rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.text-\[11px\] { font-size: 11px; }

.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

@media (min-width: 640px) {
  .container { max-width: 640px; }
}
@media (min-width: 768px) {
  .container { max-width: 768px; }
}
@media (min-width: 1024px) {
  .container { max-width: 1024px; }
}

/* Dynamically generated content styles */
.ooo-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ooo-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.25rem;
}

.ooo-person {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s ease;
}

.ooo-person:hover {
  border-color: hsla(240, 5.9%, 10%, 0.2);
}

.ooo-person-email {
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  color: hsl(var(--foreground));
}

.ooo-person-event {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8125rem;
  padding: 0.25rem 0;
  border-top: 1px solid hsl(var(--border));
}

.ooo-event-period {
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ooo-event-title {
  color: hsl(var(--foreground));
}

.ooo-muted-list {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted));
  padding: 1rem;
  border-radius: var(--radius);
}

/* Existing utility overrides */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid hsl(var(--muted));
  border-top-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Autocomplete styles */
.email-autocomplete-wrapper {
  position: relative;
}

.email-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}

.email-autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid hsla(240, 5.9%, 90%, 0.5);
  transition: background-color 0.1s ease;
}

.email-autocomplete-item:last-child {
  border-bottom: none;
}

.email-autocomplete-item:hover,
.email-autocomplete-item.active {
  background: hsl(var(--accent));
}

.email-autocomplete-item .ac-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.email-autocomplete-item .ac-email {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.125rem;
}

/* Scheduler specific */
.slot-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.2s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slot-card:hover {
  border-color: hsla(var(--primary), 0.2);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.slot-date {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
}

.slot-time {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  font-variant-numeric: tabular-nums;
}

.slot-rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.room-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.room-chip:hover {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  transform: translateY(-1px);
}

.event-day-header {
  font-size: 0.875rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.event-row {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid hsla(240, 5.9%, 90%, 0.5);
}

.event-row:last-child {
  border-bottom: none;
}

.event-time {
  flex: 0 0 120px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
  padding-top: 0.125rem;
}

.event-body {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.event-location {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

.muted {
  color: hsl(var(--muted-foreground));
  font-style: italic;
  font-weight: 400;
}

/* Scrollbar styling */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground));
}
