/* Live Kura overrides.
   Scoped with body.cb-core-redesign and !important so app.css cannot override these page refinements.
*/

/* Explore / recipe library cards */
body.cb-core-redesign .cb-recipe-list-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: stretch !important;
}

body.cb-core-redesign .cb-recipe-list-grid .recipe-card {
  min-width: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 22px !important;
  overflow: hidden !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,.09) !important;
  box-shadow: 0 16px 45px rgba(15,23,42,.07) !important;
}

body.cb-core-redesign .cb-recipe-list-grid .recipe-card > a.cb-card-link {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  display: block !important;
  color: inherit !important;
}

body.cb-core-redesign .cb-recipe-list-grid > a.recipe-card.cb-card-link {
  display: flex !important;
  flex-direction: column !important;
  color: inherit !important;
}

body.cb-core-redesign .cb-recipe-list-grid .recipe-img {
  width: 100% !important;
  height: clamp(190px, 13vw, 225px) !important;
  object-fit: cover !important;
  display: block !important;
  background: #f8fafc !important;
}

body.cb-core-redesign .cb-recipe-list-grid .recipe-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 15px !important;
  background: #fff !important;
  color: #0f172a !important;
  position: relative !important;
  z-index: 1 !important;
}

body.cb-core-redesign .cb-recipe-list-grid .recipe-topline {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.3 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  margin: 0 !important;
}

body.cb-core-redesign .cb-recipe-list-grid .cb-entity-title,
body.cb-core-redesign .cb-recipe-list-grid .recipe-body h3 {
  min-height: 42px !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  color: #0f172a !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  letter-spacing: -.025em !important;
}

body.cb-core-redesign .cb-recipe-list-grid .recipe-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px 10px !important;
  margin: 0 !important;
  color: #64748b !important;
  font-size: 12px !important;
}

body.cb-core-redesign .cb-recipe-list-grid .cb-entity-copy,
body.cb-core-redesign .cb-recipe-list-grid .recipe-body p {
  min-height: 43px !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

body.cb-core-redesign .cb-recipe-list-grid .recipe-footer,
body.cb-core-redesign .cb-recipe-list-grid .cb-recipe-footer {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  align-items: center !important;
  padding-top: 14px !important;
  margin-top: auto !important;
  border-top: 1px solid rgba(15,23,42,.09) !important;
  color: #64748b !important;
  font-size: 12px !important;
}

body.cb-core-redesign .cb-recipe-list-grid .recipe-footer strong,
body.cb-core-redesign .cb-recipe-list-grid .cb-recipe-footer strong,
body.cb-core-redesign .cb-recipe-list-grid .recipe-footer a,
body.cb-core-redesign .cb-recipe-list-grid .cb-recipe-footer a {
  color: #1f73ff !important;
  font-weight: 900 !important;
}

/* Recipe detail hero */
body.cb-core-redesign .cb-recipe-hero-card {
  display: grid !important;
  grid-template-columns: minmax(360px, .48fr) minmax(0, 1fr) !important;
  gap: 34px !important;
  align-items: center !important;
  padding: 24px !important;
  border-radius: 30px !important;
  background: rgba(255,255,255,.97) !important;
  border: 1px solid rgba(15,23,42,.1) !important;
  box-shadow: 0 20px 54px rgba(15,23,42,.08) !important;
}

body.cb-core-redesign .cb-recipe-hero-media {
  position: relative !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  max-height: 430px !important;
  border-radius: 24px !important;
  background: #f8fafc !important;
  overflow: hidden !important;
}

body.cb-core-redesign .cb-recipe-hero-media img,
body.cb-core-redesign .cb-recipe-hero-media .cb-entity-placeholder {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 24px !important;
  background: #f8fafc !important;
  display: block !important;
}

/* Make existing favorite control discoverable */
body.cb-core-redesign .cb-floating-favorite-form {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 8 !important;
  margin: 0 !important;
}

body.cb-core-redesign .favorite-floating {
  width: auto !important;
  min-width: 108px !important;
  height: 46px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: rgba(255,255,255,.95) !important;
  color: #e11d48 !important;
  box-shadow: 0 14px 34px rgba(15,23,42,.16) !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

body.cb-core-redesign .favorite-floating::after {
  content: "Save";
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.cb-core-redesign .favorite-floating[aria-label^="Remove"]::after {
  content: "Saved";
}

body.cb-core-redesign .cb-recipe-hero-content {
  justify-content: center !important;
  gap: 16px !important;
  padding: 4px !important;
}

body.cb-core-redesign .cb-recipe-hero-content h1 {
  max-width: 900px !important;
  margin-bottom: 8px !important;
  font-size: clamp(34px, 3.25vw, 58px) !important;
  line-height: 1.02 !important;
  letter-spacing: -.055em !important;
}

body.cb-core-redesign .cb-recipe-hero-content p {
  max-width: 760px !important;
  margin-bottom: 0 !important;
  font-size: 17px !important;
  line-height: 1.55 !important;
  color: #475569 !important;
}

body.cb-core-redesign .cb-detail-meta-grid,
body.cb-core-redesign .cb-stat-row,
body.cb-core-redesign .hero-stat-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  max-width: 760px !important;
  width: 100% !important;
}

body.cb-core-redesign .cb-detail-meta-grid .cb-stat-tile,
body.cb-core-redesign .cb-detail-meta-grid .stat,
body.cb-core-redesign .cb-stat-row .cb-stat-tile,
body.cb-core-redesign .hero-stat-row .stat {
  min-width: 0 !important;
  min-height: 82px !important;
  padding: 15px 16px !important;
  border-radius: 18px !important;
  background: #fff !important;
  border: 1px solid rgba(15,23,42,.09) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 6px !important;
  text-align: left !important;
}

body.cb-core-redesign .cb-detail-meta-grid .cb-stat-tile strong,
body.cb-core-redesign .cb-detail-meta-grid .stat strong,
body.cb-core-redesign .cb-stat-row .cb-stat-tile strong,
body.cb-core-redesign .hero-stat-row .stat strong {
  display: block !important;
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 19px !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
}

body.cb-core-redesign .cb-detail-meta-grid .cb-stat-tile span,
body.cb-core-redesign .cb-detail-meta-grid .stat span,
body.cb-core-redesign .cb-stat-row .cb-stat-tile span,
body.cb-core-redesign .hero-stat-row .stat span {
  display: block !important;
  margin: 0 !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  letter-spacing: .035em !important;
}

body.cb-core-redesign .cb-tag-cluster {
  margin-top: 2px !important;
}

body.cb-core-redesign .cb-recipe-hero-actions {
  margin-top: 4px !important;
  gap: 12px !important;
  align-items: center !important;
}

body.cb-core-redesign .cb-recipe-primary-grid {
  grid-template-columns: minmax(360px, .54fr) minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: start !important;
}

body.cb-core-redesign .cb-ingredients-panel,
body.cb-core-redesign .cb-steps-panel,
body.cb-core-redesign .cb-secondary-panel,
body.cb-core-redesign .cb-nutrition-panel,
body.cb-core-redesign .cb-recipe-utility-panel {
  border-radius: 26px !important;
  background: rgba(255,255,255,.94) !important;
  border: 1px solid rgba(15,23,42,.09) !important;
  box-shadow: 0 16px 42px rgba(15,23,42,.065) !important;
}

body.cb-core-redesign .cb-panel-head-tight {
  padding: 24px 24px 0 !important;
}

body.cb-core-redesign .cb-panel-head-tight h3 {
  font-size: 24px !important;
}

body.cb-core-redesign .cb-step-image {
  max-width: 520px !important;
  margin-top: 14px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  background: #fff !important;
  overflow: hidden !important;
}

body.cb-core-redesign .cb-step-image img {
  width: 100% !important;
  max-height: 320px !important;
  object-fit: cover !important;
  display: block !important;
}

body.cb-core-redesign .cb-recipe-secondary-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 22px !important;
  align-items: stretch !important;
  margin-top: 24px !important;
}

body.cb-core-redesign .cb-secondary-panel,
body.cb-core-redesign .cb-nutrition-panel,
body.cb-core-redesign .cb-recipe-utility-panel {
  grid-column: span 4 !important;
}

body.cb-core-redesign .cb-secondary-stack,
body.cb-core-redesign .cb-sidebar-stack {
  display: grid !important;
  gap: 14px !important;
}

body.cb-core-redesign .cb-mini-recipe-link {
  grid-template-columns: 96px minmax(0, 1fr) 20px !important;
  gap: 14px !important;
  padding: 12px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  background: #fff !important;
}

body.cb-core-redesign .cb-mini-recipe-link img,
body.cb-core-redesign .cb-mini-recipe-media {
  width: 96px !important;
  min-width: 96px !important;
  height: 84px !important;
  border-radius: 14px !important;
}

body.cb-core-redesign .cb-mini-recipe-copy strong {
  font-size: 16px !important;
  line-height: 1.3 !important;
}

body.cb-core-redesign .cb-mini-recipe-copy em {
  font-size: 13px !important;
}

body.cb-core-redesign .cb-nutrition-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.cb-core-redesign .cb-nutrition-mini-grid div {
  min-height: 92px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  background: #fff !important;
}

body.cb-core-redesign .cb-nutrition-mini-grid strong {
  color: #1f73ff !important;
  font-size: 26px !important;
}

body.cb-core-redesign .cb-recipe-utility-panel .btn {
  width: 100% !important;
  justify-content: center !important;
}

body.cb-core-redesign .cb-sidebar-form {
  display: grid !important;
  gap: 12px !important;
}

body.cb-core-redesign .cb-detail-divider {
  height: 1px !important;
  margin: 4px 0 !important;
  background: rgba(15,23,42,.09) !important;
}

body.cb-core-redesign .cb-utility-meta {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

body.cb-core-redesign .cb-utility-meta div {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  background: #fff !important;
}

body.cb-core-redesign .cb-utility-meta span {
  color: #64748b !important;
  font-weight: 800 !important;
}

body.cb-core-redesign .cb-utility-meta strong {
  text-align: right !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 1360px) {
  body.cb-core-redesign .cb-recipe-list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.cb-core-redesign .cb-secondary-panel,
  body.cb-core-redesign .cb-nutrition-panel,
  body.cb-core-redesign .cb-recipe-utility-panel {
    grid-column: span 6 !important;
  }
}

@media (max-width: 1100px) {
  body.cb-core-redesign .cb-recipe-hero-card,
  body.cb-core-redesign .cb-recipe-primary-grid {
    grid-template-columns: 1fr !important;
  }

  body.cb-core-redesign .cb-recipe-hero-media {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }
}

@media (max-width: 900px) {
  body.cb-core-redesign .cb-recipe-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.cb-core-redesign .cb-detail-meta-grid,
  body.cb-core-redesign .cb-stat-row,
  body.cb-core-redesign .hero-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.cb-core-redesign .cb-secondary-panel,
  body.cb-core-redesign .cb-nutrition-panel,
  body.cb-core-redesign .cb-recipe-utility-panel {
    grid-column: span 12 !important;
  }
}

@media (max-width: 700px) {
  body.cb-core-redesign .cb-detail-meta-grid,
  body.cb-core-redesign .cb-stat-row,
  body.cb-core-redesign .hero-stat-row,
  body.cb-core-redesign .cb-nutrition-mini-grid {
    grid-template-columns: 1fr !important;
  }

  body.cb-core-redesign .cb-step-image {
    max-width: 100% !important;
  }
}

@media (max-width: 620px) {
  body.cb-core-redesign .cb-recipe-list-grid {
    grid-template-columns: 1fr !important;
  }

  body.cb-core-redesign .cb-recipe-list-grid .recipe-img {
    height: 220px !important;
  }
}