/* Recipes app add-on styles (keeps site.css as the base) */

.rTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom: 14px;
}
.rTop__title{ margin:0; }
.rTop__sub{ margin-top: 6px; font-size: 13px; }
.rTop__right{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-start;
}
.rTop__btn{ min-width: 160px; }

.rGrid{
  position:relative;
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Library: mobile bottom-sheet */
.rLib{
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events:none;
}
.rLib[aria-hidden="false"]{ pointer-events:auto; }

.rLib__scrim{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.rLib[aria-hidden="false"] .rLib__scrim{ opacity: 1; }

.rLib__panel{
  position:absolute;
  left: 0; right: 0;
  bottom: 0;
  height: min(78vh, 860px);
  background: linear-gradient(180deg, rgba(16,16,26,.96), rgba(10,10,18,.96));
  border-top: 1px solid var(--border2);
  border-radius: 22px 22px 0 0;
  transform: translateY(102%);
  transition: transform var(--t) var(--ease);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  touch-action: pan-y;
}
.rLib[aria-hidden="false"] .rLib__panel{ transform: translateY(0); }

.rLib__grab{
  height: 24px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rLib__grab::before{
  content:"";
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,.18);
}

.rLib__head{
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom: 1px solid var(--border2);
}
.rLib__h{ font-weight: 950; }
.rLib__p{ font-size: 12px; margin-top: 2px; }

.rLib__tools{
  padding: 10px 12px 12px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  border-bottom: 1px solid var(--border2);
}

.rSearch{
  height: var(--tap);
  display:flex;
  align-items:center;
  gap:8px;
  border-radius: 16px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.03);
  padding: 0 10px;
}
.rSearch__icon{ opacity:.75; }
.rSearch__input{
  appearance:none;
  -webkit-appearance:none;
  border:none;
  outline:none;
  background: transparent;
  width:100%;
  min-width:0;
  font-size: 14px;
}
.rSearch__clear{
  height: 36px;
  min-width: 36px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.02);
}

.rChips{ display:flex; flex-wrap:wrap; gap:8px; }

.rSort{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.rSort__label{ font-size: 12px; font-weight: 900; }
.rSort__select{
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.02);
  padding: 0 10px;
}

.rLib__actions{ display:flex; gap:10px; flex-wrap:wrap; }
.rLib__foot{
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border2);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.rList{
  padding: 12px;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.rItem{
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.02);
  border-radius: 18px;
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap: 8px;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.rItem:active{ transform: scale(.99); }
.rItem--active{
  border-color: rgba(255,212,0,.28);
  background: rgba(255,212,0,.06);
}
.rItem__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.rItem__name{ font-weight: 950; }
.rItem__meta{ font-size: 12px; color: var(--muted); margin-top: 3px; }
.rItem__badges{ display:flex; gap:6px; flex-wrap:wrap; }
.rItem__sub{ font-size: 12px; color: var(--muted); line-height: 1.35; }

/* Desktop layout: library becomes left column panel */
@media (min-width: 980px){
  .rGrid{
    grid-template-columns: 380px 1fr;
    align-items:start;
  }

  .rLib{
    position: static;
    inset:auto;
    pointer-events:auto;
    z-index:auto;
  }
  .rLib__scrim{ display:none; }
  .rLib__panel{
    position: sticky;
    top: 78px;
    height: calc(100vh - 110px);
    border-radius: 22px;
    border: 1px solid var(--border2);
    transform: none !important;
  }
  .rLib__grab{ display:none; }
}

/* Editor card */
.rEditor{ min-width:0; }
.rCard{
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.02);
  border-radius: 22px;
  overflow:hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.rCard__head{
  padding: 12px 12px;
  border-bottom: 1px solid var(--border2);
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.rCard__titleRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.rTitle__kicker{ font-size: 12px; font-weight: 900; }
.rTitle__name{
  width: min(92vw, 520px);
  max-width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.02);
  padding: 0 12px;
  font-weight: 950;
  font-size: 16px;
  outline:none;
}
.rTitle__meta{ font-size: 12px; margin-top: 6px; }
.rHeadBtns{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.rLane{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.rLane__label{ font-size: 12px; font-weight: 900; }
.rLane__toggle{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.rQuick{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.rCard__body{ padding: 12px; }

.rCols{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 980px){
  .rCols{ grid-template-columns: 1fr 1fr; }
}
.rCol{ display:flex; flex-direction:column; gap: 12px; min-width:0; }

.rBlock{
  border: 1px solid var(--border2);
  background: rgba(0,0,0,.12);
  border-radius: 20px;
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.rBlock__h{ font-weight: 950; }

.rSliders{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.rSlider__row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-weight: 900;
}
.rSlider input[type="range"]{ width:100%; accent-color: var(--accent); }

.rNotes{
  width:100%;
  border-radius: 16px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.02);
  padding: 10px 12px;
  outline:none;
  resize: vertical;
  min-height: 120px;
  color: var(--text);
}

.rPreview__box{
  border: 1px dashed rgba(255,255,255,.14);
  background: rgba(0,0,0,.14);
  border-radius: 18px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.rPreview__row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.rPreview__hint{ font-size: 12px; }

.rHistList{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.rHistItem{
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.02);
  border-radius: 16px;
  padding: 10px 12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}
.rHistItem__left{ display:flex; flex-direction:column; gap:2px; }
.rHistItem__h{ font-weight: 950; font-size: 13px; }
.rHistItem__p{ font-size: 12px; color: var(--muted); }

.rPackBtns{ display:flex; gap:10px; flex-wrap:wrap; }