/* =========================================================
   Recipe Web App v1 Styles
   Local-first browser recipe finder
   ========================================================= */

/* ---------------------------------------------------------
   Base Reset
   --------------------------------------------------------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 193, 112, 0.22),
            transparent 32rem
        ),
        linear-gradient(135deg, #191919, #292929);
    color: #f4f0e8;
}

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */
.app-shell {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero {
    padding: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.eyebrow {
    margin: 0 0 10px;
    color: #ffcc7a;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(2.1rem, 6vw, 4.5rem);
    line-height: 0.95;
}

.hero-text {
    max-width: 680px;
    margin-bottom: 0;
    color: #ddd5c8;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ---------------------------------------------------------
   Search Panel
   --------------------------------------------------------- */
.search-panel {
    margin-top: 24px;
    padding: 24px;
    border-radius: 22px;
    background: #f5efe3;
    color: #1f1f1f;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
}

textarea {
    width: 100%;
    resize: vertical;
    padding: 16px;
    border: 2px solid #c9bfae;
    border-radius: 16px;
    font: inherit;
    line-height: 1.5;
    background: #fffaf1;
    color: #202020;
}

textarea:focus,
select:focus,
button:focus {
    outline: 3px solid rgba(255, 166, 43, 0.55);
    outline-offset: 2px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: #d96f22;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

button:hover {
    transform: translateY(-1px);
    background: #bd5f1b;
}

button.secondary {
    background: #2d2d2d;
}

.quick-add {
    margin-top: 20px;
}

.quick-add p {
    margin-bottom: 10px;
    font-weight: 800;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    border: 1px solid #d2c6b5;
    border-radius: 999px;
    padding: 8px 12px;
    background: #fffaf1;
    color: #242424;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

.chip:hover {
    background: #ffe3b8;
}

/* ---------------------------------------------------------
   Results Header
   --------------------------------------------------------- */
.results-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 30px 0 18px;
}

.results-header h2 {
    margin-bottom: 6px;
}

#resultCount {
    margin-bottom: 0;
    color: #d9d1c3;
}

select {
    min-width: 190px;
    padding: 12px 14px;
    border: 0;
    border-radius: 999px;
    background: #f5efe3;
    color: #222;
    font-weight: 800;
}

/* ---------------------------------------------------------
   Recipe Cards
   --------------------------------------------------------- */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.recipe-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}

.recipe-card h3 {
    margin-bottom: 0;
    font-size: 1.35rem;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-pill {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 204, 122, 0.16);
    color: #ffdb9d;
    font-size: 0.82rem;
    font-weight: 800;
}

.match-score {
    color: #abe6a2;
    font-weight: 800;
}

.recipe-card ul,
.recipe-card ol {
    padding-left: 20px;
    margin: 0;
}

.recipe-card li {
    margin-bottom: 7px;
    line-height: 1.45;
}

.section-title {
    margin-bottom: -6px;
    color: #ffcc7a;
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.missing {
    color: #ffb3a7;
}

.note {
    color: #d9d1c3;
    line-height: 1.5;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 26px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    color: #f4f0e8;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 700px) {
    .hero,
    .search-panel {
        padding: 22px;
    }

    .results-header {
        align-items: stretch;
        flex-direction: column;
    }

    select {
        width: 100%;
    }
}

/* ---------------------------------------------------------
   v1c Filter Controls and Cookability Badges
   --------------------------------------------------------- */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.filter-group span {
    color: #d9d1c3;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cookable {
    background: rgba(84, 180, 95, 0.22);
    color: #b9f5bd;
}

.almost {
    background: rgba(255, 204, 122, 0.18);
    color: #ffdb9d;
}

.missing-pill {
    background: rgba(255, 113, 93, 0.18);
    color: #ffb3a7;
}

@media (max-width: 700px) {
    .filter-controls {
        justify-content: stretch;
    }

    .filter-group,
    .filter-group select {
        width: 100%;
    }
}

/* ---------------------------------------------------------
   Beta Notice
   --------------------------------------------------------- */
.beta-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 204, 122, 0.32);
    border-radius: 18px;
    background: rgba(255, 204, 122, 0.12);
    color: #f4f0e8;
}

.beta-notice strong {
    color: #ffcc7a;
}

.beta-notice span {
    color: #ddd5c8;
}

/* ---------------------------------------------------------
   v1d Collapsible Recipe Cards
   --------------------------------------------------------- */
.view-recipe-btn {
    align-self: flex-start;
    margin-top: auto;
    background: #f5efe3;
    color: #1f1f1f;
}

.view-recipe-btn:hover {
    background: #ffcc7a;
}

.recipe-details {
    display: none;
    margin-top: 8px;
}

.recipe-details.open {
    display: block;
}

.recipe-details .section-title {
    margin-top: 16px;
}

.recipe-details ul,
.recipe-details ol {
    margin-bottom: 12px;
}

/* ---------------------------------------------------------
   Live Search Note
   --------------------------------------------------------- */
.live-search-note {
  margin: 10px 0 0;
  color: #6f6253;
  font-size: 0.92rem;
  font-weight: 700;
}

/* =========================================================
   v1f Blue Theme Overrides
   Changes brown/warm tones to light blue
   ========================================================= */

:root {
  --accent-blue: #5b9ee6;
  --accent-blue-dark: #447fbe;
  --accent-blue-soft: #dceeff;
  --accent-blue-soft-2: #eef7ff;
  --accent-blue-border: #b8d5f2;
  --accent-blue-hover: #cfe6ff;
  --text-blue-dark: #18324b;
  --text-blue-muted: #5f7e9d;
  --page-dark-1: #152235;
  --page-dark-2: #243b57;
  --pill-blue-bg: rgba(132, 191, 255, 0.18);
  --pill-blue-text: #d7ebff;
}

/* ---------------------------------------------------------
   Page / Header
   --------------------------------------------------------- */
body {
  background:
    radial-gradient(circle at top left, rgba(146, 203, 255, 0.25), transparent 32rem),
    linear-gradient(135deg, var(--page-dark-1), var(--page-dark-2));
}

.eyebrow,
.section-title,
.beta-notice strong {
  color: #a9d5ff;
}

.hero-text,
#resultCount,
.filter-group span {
  color: #d7e7f7;
}

/* ---------------------------------------------------------
   Main Light Panels
   --------------------------------------------------------- */
.search-panel {
  background: var(--accent-blue-soft-2);
  color: var(--text-blue-dark);
}

textarea {
  border: 2px solid var(--accent-blue-border);
  background: #f8fbff;
  color: var(--text-blue-dark);
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
button {
  background: var(--accent-blue);
  color: #ffffff;
}

button:hover {
  background: var(--accent-blue-dark);
}

button.secondary {
  background: #35597d;
}

/* ---------------------------------------------------------
   Chips
   --------------------------------------------------------- */
.chip {
  border: 1px solid var(--accent-blue-border);
  background: #f7fbff;
  color: var(--text-blue-dark);
}

.chip:hover {
  background: var(--accent-blue-hover);
}

/* ---------------------------------------------------------
   Selects / Filters
   --------------------------------------------------------- */
select {
  background: var(--accent-blue-soft-2);
  color: var(--text-blue-dark);
}

/* ---------------------------------------------------------
   Meta Pills
   --------------------------------------------------------- */
.meta-pill {
  background: var(--pill-blue-bg);
  color: var(--pill-blue-text);
}

/* Keep recipe matching / cookability colors readable */
.match-score {
  color: #b8f0bf;
}

/* ---------------------------------------------------------
   Beta Notice / Notes
   --------------------------------------------------------- */
.beta-notice {
  border: 1px solid rgba(132, 191, 255, 0.35);
  background: rgba(132, 191, 255, 0.14);
  color: #eef6ff;
}

.beta-notice span {
  color: #d7e7f7;
}

.live-search-note {
  color: var(--text-blue-muted);
}

/* ---------------------------------------------------------
   View Recipe Button
   --------------------------------------------------------- */
.view-recipe-btn {
  background: var(--accent-blue-soft-2);
  color: var(--text-blue-dark);
}

.view-recipe-btn:hover {
  background: var(--accent-blue-hover);
}

/* ---------------------------------------------------------
   v1g Beta Feedback Panel
   --------------------------------------------------------- */
.feedback-panel {
  margin-top: 34px;
  padding: 26px;
  border: 1px solid rgba(132, 191, 255, 0.28);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef6ff;
}

.feedback-panel h2 {
  margin-bottom: 10px;
}

.feedback-panel p {
  color: #d7e7f7;
  line-height: 1.55;
}

.feedback-panel ul {
  margin: 14px 0;
  padding-left: 22px;
}

.feedback-panel li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.feedback-note {
  margin-bottom: 0;
  font-weight: 800;
}


/* ---------------------------------------------------------
   v1i Reset Filters Button
   --------------------------------------------------------- */
.filter-reset-btn {
  align-self: end;
  min-height: 43px;
  padding: 12px 16px;
  background: #35597d;
  color: #ffffff;
}

.filter-reset-btn:hover {
  background: #274461;
}

@media (max-width: 700px) {
  .filter-reset-btn {
    align-self: stretch;
    width: 100%;
  }
}
