html {
  font-size: 15px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background-color: #faf8f5;
  color: #2b2622;
}

a {
  color: #9a3b1e;
}

a:hover {
  color: #6f2a15;
}

.app-navbar {
  background-color: #7a2e17;
}

.btn-primary {
  --bs-btn-bg: #9a3b1e;
  --bs-btn-border-color: #9a3b1e;
  --bs-btn-hover-bg: #7a2e17;
  --bs-btn-hover-border-color: #7a2e17;
  --bs-btn-active-bg: #6f2a15;
  --bs-btn-active-border-color: #6f2a15;
  --bs-btn-disabled-bg: #b9806f;
  --bs-btn-disabled-border-color: #b9806f;
}

.btn-outline-primary {
  --bs-btn-color: #9a3b1e;
  --bs-btn-border-color: #9a3b1e;
  --bs-btn-hover-bg: #9a3b1e;
  --bs-btn-hover-border-color: #9a3b1e;
  --bs-btn-active-bg: #7a2e17;
  --bs-btn-active-border-color: #7a2e17;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #c98a74;
  box-shadow: 0 0 0 0.2rem rgba(154, 59, 30, 0.2);
}

.form-check-input:checked {
  background-color: #9a3b1e;
  border-color: #9a3b1e;
}

/* ---- Recipe list ---- */

.recipe-list .list-group-item {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.recipe-title {
  color: #2b2622;
  font-weight: 500;
  text-decoration: none;
}

.recipe-title:hover {
  color: #9a3b1e;
  text-decoration: underline;
}

.category-badge {
  background-color: #f1e7df;
  color: #6b4a3a;
  font-weight: 500;
  text-decoration: none;
}

.category-badge:hover {
  background-color: #e6d5c8;
  color: #6b4a3a;
}

.favorite-button {
  background: none;
  border: 0;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: #b8ada5;
}

.favorite-button.is-favorite,
.favorite-button:hover {
  color: #d99a1c;
}

/* ---- Recipe page ---- */

.recipe-body p,
.recipe-notes p {
  white-space: pre-line; /* keep the line breaks typed in the recipe */
  line-height: 1.6;
}

.recipe-body {
  background: #fff;
  border: 1px solid #e8e1da;
  border-radius: 0.5rem;
  padding: 1.5rem 1.75rem;
  font-size: 1.05rem;
}

.recipe-body p:last-child {
  margin-bottom: 0;
}

.recipe-textarea {
  font-size: 1rem;
  line-height: 1.5;
}

/* ---- Import & compare ---- */

.compare-table.only-differences tr.is-same {
  display: none;
}

.compare-table td {
  font-size: 0.9rem;
}

@media print {
  body {
    background: #fff;
  }

  .recipe-body {
    border: 0;
    padding: 0;
  }
}

/* ---- Sign in ---- */

.sign-in-card {
  max-width: 26rem;
  margin-top: 3rem;
  padding: 2rem;
}

.code-input {
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  text-align: center;
}

/* ---- 📲 "Install the app" card (js/pwa.js) ---- */

.pwa-offer {
  position: fixed;
  inset-inline: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 1090;
  margin: 0 auto;
  max-width: 520px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #9a3b1e;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
  padding: 10px 12px;
}

.pwa-offer img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.pwa-offer-text {
  flex: 1;
  min-width: 12em;
  font-size: 0.95rem;
}

.pwa-offer-text b {
  display: block;
}

/* Installed app (iPhone, black-translucent status bar): keep the menu bar clear of the notch. */
@media (display-mode: standalone) {
  .app-header {
    padding-top: env(safe-area-inset-top);
    background: #7a2e17;
  }
}

/* Long web addresses in a recipe wrap instead of widening the page. */
.recipe-body a,
.recipe-notes a {
  overflow-wrap: anywhere;
}

/* Marks a recipe imported from Google Keep. */
.keep-badge {
  background-color: #fbe9a8;
  color: #6b5200;
  font-size: 0.7rem;
  font-weight: 600;
}
