/* Mobile-first base styles. Widen with min-width media queries as views are added. */

:root {
  color-scheme: light dark;
  --gap: 0.75rem;
  --border: rgba(128, 128, 128, 0.25);
  --accent: #1a73e8;
  --radius: 0.5rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.4;
}

.topbar {
  padding: var(--gap) 1rem;
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  margin: 0;
  font-size: 1.25rem;
}

#app {
  padding: 1rem;
  max-width: 640px;
  margin: 0 auto;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.btn-primary {
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: white;
}

.btn-secondary {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
}

.btn-small {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
}

.summarize-status {
  font-size: 0.8rem;
  color: #d33;
  margin: 0.3rem 0 0;
  min-height: 1em;
}

.suggest-results {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.suggest-summary {
  font-size: 0.95rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.suggest-reason {
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.8;
  margin: 0;
}

.account-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.account-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-bar-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

.account-bar-link:hover {
  text-decoration: underline;
}

.ideas-nav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.nav-tab {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  opacity: 0.6;
}

.nav-tab.active {
  opacity: 1;
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.idea-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.idea-form h2 {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
}

.import-steps {
  margin: 0 0 0.5rem;
  padding-left: 1.3rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.idea-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.date-fields {
  display: flex;
  gap: 0.6rem;
}

.date-fields label {
  flex: 1;
}

.field-hint {
  font-size: 0.8rem;
  opacity: 0.65;
  margin: -0.3rem 0 0;
}

.idea-form input,
.idea-form select,
.idea-form textarea {
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
}

.idea-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem;
}

.idea-form fieldset label,
.idea-form > label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
  font-size: 0.85rem;
  gap: 0.4rem;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
}

.review-summary-section {
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
}

.review-summary-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
}

.form-status {
  min-height: 1.2em;
  font-size: 0.85rem;
  opacity: 0.8;
  margin: 0;
}

.idea-card {
  margin-bottom: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.idea-card-summary {
  cursor: pointer;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.idea-card-summary::-webkit-details-marker {
  margin-right: 0.4rem;
}

.idea-card-summary-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.idea-card-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.suggest-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.8;
  white-space: nowrap;
  flex-shrink: 0;
}

.idea-card-summary-meta {
  font-size: 0.85rem;
  opacity: 0.75;
}

.idea-card-body {
  padding: 0 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.idea-card-body > p {
  margin: 0;
}

.idea-tags {
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0;
}

.idea-photo {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
}

.idea-review-summary {
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.85;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border);
}

.filter-date-group {
  display: flex;
  align-items: end;
  gap: 0.5rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: end;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.filter-field input,
.filter-field select {
  font-size: 0.9rem;
  padding: 0.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  font-size: 0.8rem;
  align-items: center;
}

.filter-tags label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
