/**
 * Willowdale Common Styles
 * Shared color scheme and reusable components
 */

:root {
  /* Cozy, warm palette */
  --bg: #bdc7bc;
  --text: #2c2a28;
  --muted: #6b5f57;
  --card: #fffdf9;
  --border: #e9e2d9;
  --accent: #6b8f71;
  --accent-strong: #54785c;
  --shadow: 0 1px 2px rgba(60,45,33,.06), 0 6px 18px rgba(60,45,33,.08);
}

/* Base styles for iframe pages */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: transparent;
  line-height: 1.6;
  padding: 1rem;
}

a {
  color: inherit;
}

/* Autocomplete dropdown styles */
.autocomplete-container {
  position: relative;
}

.autocomplete-loading-overlay {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
  display: none;
  z-index: 10;
}

.autocomplete-loading-overlay.visible {
  display: block;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow);
  z-index: 100;
  display: none;
}

.autocomplete-dropdown.visible {
  display: block;
}

.autocomplete-item {
  padding: 0.6rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(107,143,113,.08);
}

.autocomplete-display-name {
  font-weight: 600;
  color: var(--text);
}

.autocomplete-username {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.autocomplete-loading {
  padding: 0.6rem;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}
