/* ==========================================================================
   OneTapRecipes — Swipe Mode Styles
   Mobile-first, dark infographic hero + warm recipe body
   v11 — Design A: Warm Cards
   ========================================================================== */

/* --- Hide TinySalt chrome in swipe mode --- */
body.otr-swipe-mode {
  overflow: hidden;
  background: #000;
}
body.otr-swipe-mode .flavor-header,
body.otr-swipe-mode .flavor-footer,
body.otr-swipe-mode .site-header,
body.otr-swipe-mode .site-footer,
body.otr-swipe-mode #flavor-header,
body.otr-swipe-mode #flavor-footer,
body.otr-swipe-mode .flavor-sidebar,
body.otr-swipe-mode .sidebar,
body.otr-swipe-mode #secondary,
body.otr-swipe-mode .flavor-breadcrumbs,
body.otr-swipe-mode .breadcrumbs,
body.otr-swipe-mode .flavor-page-title-section,
body.otr-swipe-mode .flavor-related-posts,
body.otr-swipe-mode .related-posts,
body.otr-swipe-mode .flavor-post-navigation,
body.otr-swipe-mode .post-navigation,
body.otr-swipe-mode .comments-area,
body.otr-swipe-mode #comments,
body.otr-swipe-mode .flavor-author-box,
body.otr-swipe-mode .tinysalt-header,
body.otr-swipe-mode .tinysalt-footer,
body.otr-swipe-mode #tinysalt-header,
body.otr-swipe-mode #tinysalt-footer,
body.otr-swipe-mode .lstarter-header,
body.otr-swipe-mode .lstarter-footer,
body.otr-swipe-mode .entry-footer,
body.otr-swipe-mode .post-meta-footer {
  display: none !important;
}

body.otr-swipe-mode .otr-footer-main {
  margin-top: 0;
}

body.otr-swipe-mode .site-content,
body.otr-swipe-mode .content-area,
body.otr-swipe-mode #primary,
body.otr-swipe-mode #content,
body.otr-swipe-mode .flavor-content,
body.otr-swipe-mode main,
body.otr-swipe-mode article {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

/* --- Reset / base -------------------------------------------------------- */
html.otr-swipe,
html.otr-swipe body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
  background: #000;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbars everywhere in swipe mode */
html.otr-swipe *::-webkit-scrollbar { display: none; }
html.otr-swipe * { scrollbar-width: none; }

/* --- Back bar ------------------------------------------------------------ */
.otr-back-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: env(safe-area-inset-top, 10px) 16px 10px;
  background: linear-gradient(rgba(0,0,0,0.5), transparent);
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  pointer-events: none;
}
.otr-back-bar a {
  pointer-events: auto;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.otr-back-bar .otr-back-arrow {
  font-size: 16px;
  line-height: 1;
}
.otr-back-bar .otr-back-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
/* Hamburger button — fixed top right, slightly below edge */
.otr-menu-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 10px) + 6px);
  right: 16px;
  z-index: 950;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: background 0.2s;
}
.otr-menu-btn:active {
  background: rgba(255,255,255,0.3);
}

/* --- Counter & dots ------------------------------------------------------ */
.otr-counter {
  position: fixed;
  top: env(safe-area-inset-top, 10px);
  right: 16px;
  z-index: 900;
  color: rgba(255,255,255,0.4);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  padding: 10px;
  pointer-events: none;
}
.otr-dots {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  gap: 5px;
  pointer-events: none;
}
.otr-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: all 0.3s;
}
.otr-dots span.active {
  background: #C8956C;
  width: 18px;
  border-radius: 3px;
}

/* --- Swipe wrapper (viewport lock) --------------------------------------- */
.otr-swipe-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

/* --- Feed container ------------------------------------------------------ */
#otr-feed {
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform .35s cubic-bezier(.25,.1,.25,1);
  touch-action: pan-y;
}

/* --- Individual slide ---------------------------------------------------- */
.otr-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.otr-slide::-webkit-scrollbar { display: none; }

/* --- Hero section (infographic) ------------------------------------------ */
.otr-hero {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: clip;
}
.otr-hero img {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.otr-hero-grad {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(transparent, rgba(0,0,0,0.35));
  pointer-events: none;
}

/* Overlay elements (hidden on pinch-zoom) */
.overlay-el {
  transition: opacity .3s ease;
}
body.zoomed .otr-back-bar,
body.zoomed .otr-dots,
body.zoomed .otr-counter,
body.zoomed .overlay-el {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.15s;
}
body:not(.zoomed) .otr-back-bar,
body:not(.zoomed) .otr-dots,
body:not(.zoomed) .otr-counter,
body:not(.zoomed) .overlay-el {
  transition: opacity 0.3s;
}

/* Hero info */
.otr-hero-info {
  position: absolute;
  bottom: 70px;
  left: 16px;
  right: 70px;
  color: #fff;
  z-index: 10;
}
.otr-hero-info h2 {
  margin: 0 0 4px;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.otr-hero-info p {
  margin: 0 0 6px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.otr-htags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 56px;
  overflow: hidden;
}
.otr-htags a,
.otr-htags .otr-htag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* "Pick another" button — back to Choose Yourself slide */
.otr-pick-another {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 15;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-family: Inter, system-ui, sans-serif;
  cursor: pointer;
  pointer-events: auto;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.otr-pick-another:active {
  opacity: 0.7;
  transform: scale(0.96);
}

/* Hero action buttons — TikTok-style vertical on right side */
.otr-hero-actions {
  position: absolute;
  right: 14px;
  bottom: 70px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
}
.otr-hero-actions button,
.otr-hero-actions a {
  background: none;
  border: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.otr-hero-actions button span,
.otr-hero-actions a span {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.otr-hero-actions button small,
.otr-hero-actions a small {
  display: none;
}
.otr-hero-actions button:active,
.otr-hero-actions a:active {
  opacity: 0.7;
  transform: scale(1.15);
}
/* Save — bigger */
.otr-hero-actions .otr-btn-save span {
  font-size: 34px;
}
.otr-hero-actions .otr-btn-save.is-saved span {
  color: #E53935;
}

/* Scroll hint — HIDDEN */
.otr-scroll-hint {
  display: none;
}

/* ==========================================================================
   Recipe Section — Design A: Warm Cards
   ========================================================================== */
.otr-recipe {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: #F5F0E8;
  color: var(--otr-text);
  font-family: Inter, system-ui, sans-serif;
}

.otr-dish-wrap {
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}

.otr-dish-photo {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 0 0 12px 12px;
  display: block;
}

.otr-rbody {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

.otr-recipe-header {
  padding: 24px 0 8px;
}

.otr-recipe-title {
  font-family: 'Gloock', Georgia, serif;
  font-size: 28px;
  line-height: 1.2;
  color: var(--otr-text);
  margin-bottom: 8px;
}

.otr-recipe-summary {
  font-size: 17px;
  color: var(--otr-text2);
  line-height: 1.5;
  margin: 0;
}

/* --- Card --- */
.otr-card {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(44,36,32,0.07);
  padding: 20px;
  margin-bottom: 16px;
}

.otr-card-title {
  font-family: 'Gloock', Georgia, serif;
  font-size: 20px;
  color: var(--otr-text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.otr-card-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* --- Meta Grid --- */
.otr-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.otr-meta-item {
  text-align: center;
  padding: 12px 4px;
  background: #F5F0E8;
  border-radius: 8px;
}

.otr-meta-icon {
  font-size: 20px;
  margin-bottom: 4px;
  display: flex;
  justify-content: center;
}

.otr-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--otr-text2);
  font-weight: 600;
}

.otr-meta-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--otr-text);
}


/* --- Equipment --- */
.otr-equipment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.otr-equipment-list li {
  padding: 8px 0;
  border-bottom: 1px solid #F0EBE4;
  font-size: 15px;
  padding-left: 28px;
  position: relative;
}
.otr-equipment-list li:last-child { border-bottom: none; }
.otr-equipment-list li::before {
  content: '2';
  color: var(--otr-accent);
  font-size: 18px;
  position: absolute;
  left: 8px;
  top: 7px;
}
/* --- Ingredients --- */
.otr-ingredients-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.otr-ingredients-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F0EBE4;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.otr-ingredients-list li:last-child { border-bottom: none; }

.otr-ingredients-list li.checked {
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-color: var(--otr-text2);
}

.otr-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #E8DFD4;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checked .otr-checkbox {
  background: var(--otr-accent);
  border-color: var(--otr-accent);
}

.checked .otr-checkbox::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

/* --- Instructions --- */
.otr-instructions-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.otr-instructions-list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #F0EBE4;
  font-size: 15px;
  line-height: 1.55;
}

.otr-instructions-list li:last-child { border-bottom: none; }

.otr-step-num {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--otr-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin-top: 1px;
}

/* --- Nutrition --- */
.otr-nutrition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.otr-nutrition-item {
  background: #F5F0E8;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
}

.otr-nutrition-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--otr-accent);
}

.otr-nutrition-value small {
  font-size: 12px;
  font-weight: 400;
  color: var(--otr-text2);
  margin-left: 2px;
}

.otr-nutrition-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--otr-text2);
  font-weight: 600;
  margin-top: 2px;
}

/* --- Tags --- */
.otr-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.otr-tag-pill {
  background: #F5F0E8;
  color: var(--otr-text2);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid #E8DFD4;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.otr-tag-pill:hover {
  background: rgba(198,123,92,0.12);
  border-color: var(--otr-accent);
  color: var(--otr-accent);
}

.otr-tag-pill.diet {
  background: #E8EDCE;
  color: #747B2D;
  border-color: #D5DCAD;
  font-weight: 600;
}

/* --- Back to top --- */
.otr-back-top {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.otr-back-top .otr-scroll-to-hero {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--otr-accent);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 2px 12px rgba(44,36,32,0.07);
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.otr-back-top .otr-scroll-to-hero:hover { transform: translateY(-2px); }

/* ==========================================================================
   Overlay hidden state (single tap toggle)
   ========================================================================== */
body.overlay-hidden .overlay-el,
body.overlay-hidden .otr-hero-info,
body.overlay-hidden .otr-hero-actions,
body.overlay-hidden .otr-scroll-hint,
body.overlay-hidden .otr-counter,
body.overlay-hidden .otr-dots {
  opacity: 0 !important;
  pointer-events: none !important;
}
body.overlay-hidden .otr-back-bar {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Desktop (>= 768px) — Design A responsive
   ========================================================================== */
@media (min-width: 768px) {
  .otr-rbody { padding: 0 24px 80px; }
  .otr-recipe-title { font-size: 36px; }
  .otr-recipe-header { padding: 32px 0 12px; }
  .otr-card { padding: 28px; margin-bottom: 20px; }
  .otr-meta-grid { grid-template-columns: repeat(6, 1fr); }
  .otr-nutrition-grid { grid-template-columns: repeat(6, 1fr); }
  .otr-ingredients-list { columns: 2; column-gap: 24px; }
  .otr-ingredients-list li { break-inside: avoid; }
}

/* ==========================================================================
   Desktop (>= 1024px) — Layout & hero
   ========================================================================== */
@media (min-width: 1024px) {
  /* Desktop: LIGHT cream background (not dark) */
  html.otr-swipe,
  html.otr-swipe body {
    background: #F5F0E8;
  }

  .otr-back-bar {
    padding: 14px 32px;
    font-size: 15px;
  }

  .otr-counter {
    right: 32px;
    font-size: 14px;
    color: rgba(0,0,0,0.4);
  }

  .otr-hero-info h2 {
    font-size: 28px;
  }

  /* Desktop: vertical TikTok buttons (same as mobile) */
  .otr-hero-info {
    right: 70px;
  }

  /* Dish photo capped on desktop */
  .otr-dish-wrap {
    max-width: 800px;
    margin: 0 auto;
  }

  .otr-rbody {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 80px;
  }

  .otr-recipe-title {
    font-size: 36px;
  }

  /* Desktop navigation arrows - inside hero, not fixed to viewport */
  .otr-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 910;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .otr-nav-arrow:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
  }
  .otr-nav-arrow:disabled {
    opacity: .2;
    cursor: default;
  }
  .otr-nav-arrow.prev { left: calc(50% - 28.125vh - 60px); }
  .otr-nav-arrow.next { right: calc(50% - 28.125vh - 60px); }

  /* Back bar + menu btn lower on desktop */
  .otr-back-bar { top: 16px; }
  .otr-menu-btn { top: 16px; }
}

/* ==========================================================================
   Loading state
   ========================================================================== */
.otr-slide.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}
.otr-slide.is-loading::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: otr-spin .7s linear infinite;
}
@keyframes otr-spin {
  to { transform: rotate(360deg); }
}

/* --- "Choose Yourself" slide ------------------------------------------- */
.otr-choose-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}
.otr-choose-content {
  text-align: center;
  padding: 32px 24px;
  max-width: 400px;
}
.otr-choose-title {
  font-family: Georgia, serif;
  font-size: 26px;
  color: #fff;
  margin-bottom: 8px;
}
.otr-choose-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  margin-bottom: 24px;
}
.otr-choose-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.otr-choose-btn {
  padding: 10px 20px;
  border-radius: 24px;
  border: 1.5px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
}
.otr-choose-btn:hover {
  background: var(--otr-accent);
  border-color: var(--otr-accent);
  color: #fff;
  transform: scale(1.03);
  transition: all 0.15s ease;
}
.otr-choose-btn:active {
  transform: scale(0.93);
  background: #a5604a;
  border-color: #a5604a;
  color: #fff;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
  transition: all 0.08s ease;
}

/* Dots hidden per user request */
.otr-dots { display: none !important; }

/* --- Divider between infographic and recipe --- */
.otr-recipe::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--otr-accent) 0%, #DEB538 50%, var(--otr-accent) 100%);
  border-radius: 2px;
  margin: 0 auto;
  width: 60px;
  padding-top: 16px;
  background-clip: content-box;
}

/* --- Pack F SVG icons --- */
.otr-hero-actions button svg,
.otr-hero-actions a svg {
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.otr-hero-actions button span,
.otr-hero-actions a span {
  display: flex;
  align-items: center;
  justify-content: center;
}
