/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.chore-preview {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  color: #334155;
}

.chore-preview > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.chore-preview > header strong {
  color: #0f172a;
  font-size: clamp(0.72rem, 1.5vw, 1.05rem);
}

.chore-preview > header span {
  color: #64748b;
  font-size: clamp(0.42rem, 0.85vw, 0.7rem);
}

.chore-grid {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(5rem, 1.9fr) repeat(7, minmax(1.45rem, 1fr));
  grid-auto-rows: minmax(1.15rem, 1fr);
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
}

.chore-grid > * {
  display: grid;
  place-items: center;
  min-width: 0;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.chore-grid b,
.chore-grid em {
  padding: 0.22rem;
  overflow: hidden;
  font-size: clamp(0.34rem, 0.72vw, 0.62rem);
  font-style: normal;
  text-overflow: ellipsis;
}

.chore-grid strong {
  position: relative;
}

.chore-grid strong::after {
  width: 75%;
  border-bottom: 1px solid currentColor;
  content: "";
  opacity: 0.55;
}

.chore-grid i::after {
  display: block;
  width: clamp(0.32rem, 0.75vw, 0.62rem);
  aspect-ratio: 1;
  border: 1px solid currentColor;
  content: "";
}

.chore-marker-circles .chore-grid i::after {
  border-radius: 50%;
}

.chore-marker-stars .chore-grid i::after {
  border: 0;
  content: "☆";
  font-size: clamp(0.5rem, 1.15vw, 0.92rem);
  line-height: 1;
}

.chore-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.6rem;
}

.chore-footer span {
  min-height: clamp(1.8rem, 5vw, 3.4rem);
  padding: 0.45rem;
  border: 1px solid currentColor;
  border-radius: 0.35rem;
  font-size: clamp(0.38rem, 0.75vw, 0.64rem);
}

.sudoku-preview {
  display: grid;
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(0.35rem, 1vw, 0.75rem);
  color: #334155;
}

.sudoku-preview > header,
.sudoku-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sudoku-preview > header strong {
  color: #0f172a;
  font-size: clamp(0.7rem, 1.5vw, 1.05rem);
}

.sudoku-preview > header span,
.sudoku-name-row,
.sudoku-preview > footer {
  color: #64748b;
  font-size: clamp(0.34rem, 0.72vw, 0.58rem);
}

.sudoku-name-row span {
  width: 42%;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #cbd5e1;
}

.sudoku-grid {
  display: grid;
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
  grid-template-columns: repeat(9, 1fr);
  border: 2px solid currentColor;
}

.sudoku-grid span {
  display: grid;
  place-items: center;
  min-width: 0;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  color: #0f172a;
  font-size: clamp(0.5rem, 1.65vw, 1.15rem);
  font-weight: 700;
}

.sudoku-grid span:nth-child(9n) {
  border-right: 0;
}

.sudoku-grid span:nth-child(n+73) {
  border-bottom: 0;
}

.sudoku-grid span:nth-child(9n+3),
.sudoku-grid span:nth-child(9n+6) {
  border-right-width: 2px;
}

.sudoku-grid span:nth-child(n+19):nth-child(-n+27),
.sudoku-grid span:nth-child(n+46):nth-child(-n+54) {
  border-bottom-width: 2px;
}

.sudoku-preview > footer {
  text-align: center;
}

.word-list-input { min-height: 150px; resize: vertical; line-height: 1.45; }
.word-search-warning { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 12px; line-height: 1.45; }
.word-search-source-field { border: 0; margin: 0; min-width: 0; padding: 0; }
.word-search-source-switch { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.word-search-source-switch label { align-items: flex-start; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; cursor: pointer; display: flex; gap: 9px; padding: 12px; transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease; }
.word-search-source-switch label:has(input:checked) { background: #eff6ff; border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.14); }
.word-search-source-switch input { accent-color: #2563eb; flex: 0 0 auto; margin-top: 2px; }
.word-search-source-switch span { display: grid; gap: 4px; }
.word-search-source-switch strong { color: #0f172a; font-size: 13px; line-height: 1.2; }
.word-search-source-switch small { color: #64748b; font-size: 11px; line-height: 1.4; }
.word-search-custom-action { display: flex; margin-top: 4px; }
.word-search-custom-action .button { width: 100%; }
.word-search-variation { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #dbeafe; border-radius: 12px; background: #f8fbff; }
.word-search-variation > div { display: grid; gap: 3px; }
.word-search-variation span { color: #334155; font-size: 13px; }
.word-search-variation small { color: #64748b; font-size: 11px; line-height: 1.4; }
.word-search-variation .button { min-height: 38px; flex: 0 0 auto; padding: 8px 12px; font-size: 12px; }
.word-search-preview { display: grid; height: 100%; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: clamp(0.3rem, 0.9vw, 0.65rem); color: #334155; }
.word-search-preview > header, .word-search-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.word-search-preview > header strong { color: #0f172a; font-size: clamp(0.65rem, 1.4vw, 1rem); }
.word-search-preview > header span, .word-search-name-row, .word-search-bank { color: #64748b; font-size: clamp(0.3rem, 0.66vw, 0.55rem); }
.word-search-name-row span { width: 42%; padding-bottom: 0.18rem; border-bottom: 1px solid #cbd5e1; }
.word-search-grid { display: grid; width: auto; max-width: 100%; height: 100%; max-height: 100%; min-height: 0; aspect-ratio: 1; align-self: center; justify-self: center; grid-template-columns: repeat(var(--word-search-size), 1fr); border: 1.5px solid currentColor; }
.word-search-grid span { display: grid; place-items: center; min-width: 0; overflow: hidden; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; color: #0f172a; font-size: clamp(0.28rem, 0.85vw, 0.7rem); font-weight: 700; line-height: 1; }
.word-search-bank { display: grid; gap: 0.25rem; }
.word-search-bank > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.12rem 0.5rem; }
.word-search-bank span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-search-bank-hidden { padding-top: 0.2rem; text-align: center; }
