/* ============================================================================
   MiniBocados login and new product surfaces
   Built only with the prototype design tokens. The approved prototype CSS lives
   untouched in ../app.css.
   ============================================================================ */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border: 2.5px solid var(--text-dark);
  border-radius: var(--radius-pill);
  background: var(--mango);
  color: var(--text-dark);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

#app-view h1[tabindex="-1"]:focus {
  outline: none;
}

body.is-auth-screen {
  padding-bottom: 0;
}

body.is-auth-screen [data-app-chrome] {
  display: none !important;
}

body.is-auth-screen #toast-container {
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

/* Anchor versions of the prototype navigation keep the same visual language. */
.brand-logo,
.desk-nav-btn,
.dock-btn,
.header-welcome-chip,
.cat-world-card,
.recipe-card-link,
.recipe-photo-link {
  text-decoration: none;
}

.desk-nav-btn,
.dock-btn,
.header-welcome-chip,
.recipe-card-link,
.recipe-photo-link,
.cat-world-card,
.hub-tile {
  color: inherit;
}

.btn-playful-coral,
.btn-playful-mango,
.btn-playful-mint,
.btn-playful-white,
.hub-tile {
  text-decoration: none;
}

.hub-tile {
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.desk-nav-btn,
.header-welcome-chip,
.cat-chip-btn,
.playful-select,
.btn-playful-white,
.playful-search-submit,
.shop-check-trigger {
  min-height: 44px;
}

.dock-btn {
  min-height: 58px;
}

.shop-remove-btn {
  width: 45px;
  height: 45px;
  min-width: 45px;
  min-height: 45px;
}

.playful-search-box input,
.explorer-search-input input,
.shopping-form-row input {
  min-height: 44px;
}

.brand-mascot svg,
.cat-mascot-figure > svg,
.empty-mascot-box > svg,
.safety-mascot-badge > svg,
.hub-tile svg,
.login-mascot svg,
.login-brand-mascot svg,
.account-avatar svg,
.status-mascot svg {
  display: block;
  width: 100%;
  height: 100%;
}

.section-heading-bar > * {
  min-width: 0;
}

.explorer-panel .cat-filter-strip {
  max-width: 100%;
}

.explorer-search-input input {
  min-width: 0;
}

/* Recipe cards use links without nesting the favorite control. */
.recipe-photo-frame {
  display: block;
}

.recipe-photo-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  border-radius: inherit;
}

.recipe-photo-link:focus-visible {
  outline: 3px dashed var(--text-dark);
  outline-offset: -6px;
}

[data-image-holder],
.recipe-image-holder {
  display: block;
  width: 100%;
  height: 100%;
}

.category-sticker {
  pointer-events: none;
}

.fun-toast.is-hiding {
  animation: none;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.recipe-card-content > .recipe-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.recipe-card-link:focus-visible {
  outline: 3px dashed var(--text-dark);
  outline-offset: 4px;
  border-radius: 12px;
}

.recipe-card-desc:empty {
  display: none;
}

/* ============================================================================
   Login
   ============================================================================ */

.login-screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  overflow: hidden;
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 34px 26px 26px;
  background: var(--white);
  border: 3px solid var(--text-dark);
  border-radius: var(--radius-blob);
  box-shadow: var(--shadow-card);
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(52, 51, 74, 0.1);
  border-radius: calc(var(--radius-blob) - 10px);
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.login-brand-mascot {
  width: 82px;
  height: 82px;
  filter: drop-shadow(0 6px 8px rgba(52, 51, 74, 0.16));
}

.login-brand h1 {
  font-size: clamp(2rem, 8vw, 2.6rem);
  line-height: 1;
}

.login-brand h1 .part-mini {
  color: var(--coral-dark);
}

.login-brand h1 .part-bocados {
  color: var(--text-dark);
}

.login-tagline {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-muted);
}

.login-access-badge {
  align-self: center;
  transform: rotate(-1deg);
}

.login-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.login-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 15px;
  background: var(--bg-ivory);
  border: 2.5px solid var(--text-dark);
  border-radius: var(--radius-md);
  font-weight: 700;
}

.login-input::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

.login-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
}

.login-error {
  padding: 10px 13px;
  background: var(--coral-soft);
  border: 2.5px solid var(--coral-dark);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-dark);
}

.login-error[hidden] {
  display: none;
}

.login-dev-note {
  position: relative;
  z-index: 1;
  padding-top: 2px;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.login-mascot {
  display: none;
  position: absolute;
  width: 96px;
  height: 96px;
  z-index: 1;
  filter: drop-shadow(0 10px 14px rgba(52, 51, 74, 0.15));
  pointer-events: none;
}

.login-mascot--strawberry {
  left: max(18px, calc(50% - 330px));
  bottom: 16%;
  transform: rotate(-10deg);
}

.login-mascot--banana {
  right: max(18px, calc(50% - 340px));
  top: 13%;
  transform: rotate(11deg);
}

.login-mascot--carrot {
  right: max(38px, calc(50% - 300px));
  bottom: 12%;
  transform: rotate(-6deg);
}

@media (min-width: 880px) {
  .login-mascot {
    display: block;
  }
}

/* ============================================================================
   Explorer additions
   ============================================================================ */

.filter-secondary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
}

.filter-fieldset {
  min-width: min(100%, 460px);
  margin: 0;
  padding: 0;
  border: 0;
}

.filter-fieldset legend {
  margin-bottom: 5px;
  padding: 0;
}

.shop-check-trigger {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.shop-check-trigger:focus-visible {
  outline: 3px dashed var(--text-dark);
  outline-offset: 3px;
  border-radius: 10px;
}

.btn-playful-mint:disabled,
.btn-playful-coral:disabled {
  opacity: 0.65;
  cursor: progress;
}

.filter-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.allergen-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.allergen-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 13px;
  background: var(--bg-ivory);
  border: 2.5px solid var(--text-dark);
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.allergen-option:has(input:checked) {
  background: var(--mint-soft);
  box-shadow: 0 3px 0 rgba(52, 51, 74, 0.18);
}

.allergen-option:has(input:focus-visible) {
  outline: 3px dashed var(--text-dark);
  outline-offset: 3px;
}

.allergen-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--mint-dark);
}

.explorer-results {
  margin-top: 22px;
}

.explorer-results-count {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================================
   Detail additions
   ============================================================================ */

.detail-summary-copy {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 1rem;
}

.detail-tag-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.detail-tag-label {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.detail-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-tag {
  padding: 4px 10px;
  border: 2px solid var(--text-dark);
  border-radius: var(--radius-pill);
  background: var(--bg-ivory);
  font-size: 0.76rem;
  font-weight: 800;
}

.detail-tag--allergen {
  background: var(--coral-soft);
}

.detail-ingredients-list .ing-check-item {
  align-items: flex-start;
  cursor: default;
}

.detail-ingredients-list .ing-check-item:hover {
  background: var(--bg-ivory);
}

.detail-work-grid {
  grid-template-columns: minmax(0, 1fr);
}

.recipe-section-card {
  min-width: 0;
}

.detail-ingredients-list .ing-check-item {
  flex-wrap: wrap;
}

.detail-ingredients-list .ing-left {
  flex: 1 1 180px;
  align-items: flex-start;
  width: auto;
  min-width: 0;
}

.detail-ingredients-list .ing-qty-badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.detail-ingredients-list .ing-tick-circle {
  margin-top: 1px;
  color: var(--coral-dark);
  background: var(--coral-soft);
}

.ingredient-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ingredient-measure {
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--text-muted);
}

.substitution-note {
  margin-top: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-muted);
}

.substitution-note strong {
  color: var(--text-dark);
}

.detail-extra-block {
  background: var(--white);
  border: 3px solid var(--text-dark);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
}

.detail-extra-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.age-cut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.age-cut-card {
  padding: 14px;
  background: var(--bg-ivory);
  border: 2px solid var(--text-dark);
  border-radius: var(--radius-md);
}

.age-cut-card:nth-child(2) {
  background: var(--sky-soft);
}

.age-cut-card:nth-child(3) {
  background: var(--mint-soft);
}

.age-cut-label {
  display: block;
  margin-bottom: 4px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
}

.age-cut-card p {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.detail-info-callout {
  margin-top: 18px;
  padding: 16px;
  background: var(--lavender-soft);
  border: 2.5px solid var(--text-dark);
  border-radius: 20px;
}

.detail-info-callout strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.02rem;
}

.detail-info-callout p {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* ============================================================================
   Account and system states
   ============================================================================ */

.account-screen,
.no-access-screen {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.account-heading,
.no-access-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-heading-mascot,
.no-access-heading-mascot {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.account-card,
.no-access-card {
  padding: 22px 20px;
  background: var(--white);
  border: 3px solid var(--text-dark);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.account-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.account-avatar {
  width: 72px;
  height: 72px;
  padding: 7px;
  flex-shrink: 0;
  background: var(--mango-soft);
  border: 2.5px solid var(--text-dark);
  border-radius: 24px;
}

.account-meta {
  min-width: 0;
}

.account-meta h2 {
  font-size: 1.35rem;
}

.account-email {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.account-dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 4px 11px;
  background: var(--coral-soft);
  border: 2px solid var(--text-dark);
  border-radius: var(--radius-pill);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.account-section-title {
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.account-section-copy {
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.account-module-list {
  display: grid;
  gap: 10px;
}

.account-module {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  background: var(--bg-ivory);
  border: 2.5px solid var(--text-dark);
  border-radius: var(--radius-md);
}

.account-module strong {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
}

.account-module span {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-notice {
  margin-top: 4px;
  padding: 16px;
  background: var(--lavender-soft);
  border: 2.5px solid var(--text-dark);
  border-radius: var(--radius-md);
}

.legal-notice-title {
  margin-bottom: 8px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.legal-notice-intro,
.legal-notice-item p {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.65;
}

.legal-notice-items {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding-left: 1.25em;
}

.legal-notice-item {
  padding-left: 2px;
}

.legal-notice-item::marker {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
}

.legal-notice-item strong {
  display: block;
  margin-bottom: 2px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.94rem;
  line-height: 1.35;
}

.legal-notice-item p {
  margin: 0;
  color: var(--text-dark);
}

.legal-notice-contact {
  margin-top: 14px;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.legal-notice-mail {
  color: var(--lavender-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.legal-notice-mail:hover {
  color: var(--text-dark);
}

.legal-notice-version {
  margin-top: 14px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.status-panel {
  margin: 32px auto;
  max-width: 620px;
  padding: 34px 24px;
  background: var(--white);
  border: 3.5px solid var(--text-dark);
  border-radius: var(--radius-blob);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.status-mascot {
  width: 110px;
  height: 110px;
  margin: 0 auto 14px;
}

.status-panel h1,
.status-panel h2 {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
}

.status-panel p {
  max-width: 460px;
  margin: 0 auto 18px;
  font-weight: 700;
  color: var(--text-muted);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.image-fallback-compact {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 6px;
}

.image-fallback-compact > div {
  width: 100%;
  height: 100%;
}

.image-fallback-compact svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================================================
   Small screens
   ============================================================================ */

@media (max-width: 430px) {
  .brand-pill-tag {
    display: none;
  }

  .brand-logo {
    gap: 7px;
    padding: 6px 10px 6px 7px;
  }

  .brand-title {
    font-size: 1.18rem;
  }

  .brand-mascot {
    width: 36px;
    height: 36px;
  }

  .header-welcome-chip {
    width: 44px;
    min-width: 44px;
    padding: 6px;
    justify-content: center;
  }

  .header-welcome-chip .welcome-text {
    display: none;
  }

  .welcome-icon {
    font-size: 1.35rem;
  }

  .login-card {
    padding: 30px 20px 22px;
  }

  .legal-notice {
    padding: 14px 12px;
  }

  .legal-notice-items {
    padding-left: 1.1em;
  }

  .detail-stats-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-bar .btn-playful-white,
  .section-heading-bar .btn-playful-mango {
    width: 100%;
  }
}

@media (min-width: 820px) {
  .header-welcome-chip {
    display: none;
  }

  .account-dev-badge {
    margin-top: 0;
  }
}
