/* Overall Layout */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #ececec;
  color: #2b2b2b;
}

header {
  width: 100%;
}

.app-header {
  padding: 20px 20px 15px 20px;
  background: #dfeee0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.header-text {
  display: inline-flex;
  align-items: flex-end;
  padding: 16px 24px 0 24px;
  gap: 10px;
}

.header-text h1 {
  margin: 0;
}

.subtitle {
  margin: 0 0 3px 0;
  opacity: 0.7;
  font-size: 1.1rem;
}

.birdy {
  padding: 0px 20px 0px 20px;
  margin-left: auto;
}

.app {
  width: 100%;
  max-width: 1200px; /* or min(80vw, 1200px) ? */
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 32px;
  padding: 24px;
}

/* Query builder (lanes) */
.query-builder {
  display: grid;
  row-gap: 12px;
}

.clause {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: start;
}

.clause label {
  font-size: 1.8rem;
  font-weight: 600;
  padding: 10px;
}

.clause-body {
  min-height: 48px;
  background: #dff5c8;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Palettes (collapsed view) */
.palettes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.palette {
  background: #cfeee7;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.palette header {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
}

.palette-body {
  display: block; /* modified flex to block so the buttons stack vertically */
  gap: 8px;
/*  overflow-x: auto; */ /* this might be causing issues with the .palette where the buttons are not stacking vertically -> flex-direction: column */
}

/* Tokens */
.token {
  background: #a8ddd0;
  padding: 8px 14px;
  margin: 10px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  font-size: 1.7rem;
  font-weight: 600;
  text-align: center;
}

.token.dimmed {
  opacity: 0.3;
  pointer-events: none;
}

/* Expanded palette state */
.palette.expanded {
  grid-column: 1 / -1;
}

.palette.expanded .palette-body {
  flex-wrap: nowrap;
}

*/ Mobile stacking */
@media (max-width: 768px) {
  .app {
    
  }
  
  .palettes {
    grid-template-columns: 1fr;
  }
}

*/ Tablet stacking */
@media (max-width: 1200px) {
  .app {
  
  }
}
