/* ============================================================================
 * glac_ricettario.css — UI specifica del Ricettario (elenco + dettaglio).
 * Dipende dai token di ricettario-common.css. Caricare DOPO il comune.
 * ========================================================================== */

.rc-wrap {
  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
  color: var(--rc-text);
  background: var(--rc-bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.rc-wrap * { box-sizing: border-box; }

/* --- Header / toolbar ------------------------------------------------------ */
.rc-header {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px; justify-content: space-between;
  margin-bottom: 16px;
}
.rc-h1 { font-size: 1.6rem; margin: 0; color: var(--rc-accent); }
.rc-h2 { font-size: 1.15rem; margin: 0; }
.rc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rc-import { display: flex; gap: 6px; }

.rc-input {
  padding: 8px 12px; font-size: .95rem;
  border: 1px solid var(--rc-border); border-radius: 8px;
  background: var(--rc-surface); color: var(--rc-text);
  min-width: 180px;
}
.rc-input:disabled { opacity: .55; cursor: not-allowed; }

.rc-btn {
  padding: 8px 14px; font-size: .95rem; cursor: pointer;
  border: 1px solid var(--rc-accent); border-radius: 8px;
  background: var(--rc-accent); color: #fff;
}
.rc-btn:disabled { opacity: .5; cursor: not-allowed; }
.rc-btn-ghost {
  background: transparent; color: var(--rc-accent);
  margin-bottom: 8px;
}

/* --- Griglia card ---------------------------------------------------------- */
.rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.rc-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow);
  overflow: hidden; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.rc-card:hover, .rc-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  outline: none;
}
.rc-thumb {
  height: 130px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rc-accent-2), var(--rc-accent));
}
.rc-thumb-ph { font-size: 2.2rem; font-weight: 700; color: #fff; letter-spacing: 1px; }
.rc-card-body { padding: 12px 14px; }
.rc-card-title { font-weight: 600; font-size: 1.05rem; margin-bottom: 8px; }
.rc-card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: .82rem; color: var(--rc-muted); }
.rc-badge {
  background: var(--rc-badge-bg); color: var(--rc-badge-fg);
  padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600;
}
.rc-empty { color: var(--rc-muted); text-align: center; padding: 24px; }

/* --- Dettaglio ------------------------------------------------------------- */
.rc-detail .rc-desc { color: var(--rc-muted); margin: 4px 0 14px; }
.rc-facts {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-size: .88rem; color: var(--rc-muted);
  padding-bottom: 14px; border-bottom: 1px solid var(--rc-border);
  margin-bottom: 16px;
}
.rc-ing-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 10px;
}
.rc-portions { display: flex; align-items: center; gap: 6px; }
.rc-portions label { font-size: .85rem; color: var(--rc-muted); margin-right: 4px; }
.rc-serv-input {
  width: 60px; text-align: center; padding: 6px;
  border: 1px solid var(--rc-border); border-radius: 8px;
  background: var(--rc-surface); color: var(--rc-text); font-size: 1rem;
}
.rc-step-btn {
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--rc-border); background: var(--rc-surface);
  color: var(--rc-text); font-size: 1.1rem; line-height: 1;
}
.rc-step-btn:hover { border-color: var(--rc-accent); color: var(--rc-accent); }

.rc-ing-list { list-style: none; padding: 0; margin: 0 0 24px; }
.rc-ing {
  display: flex; gap: 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--rc-border);
}
.rc-ing-qty { min-width: 90px; font-weight: 600; color: var(--rc-accent); }
.rc-ing-name { color: var(--rc-text); }

.rc-step-list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.rc-step { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.rc-step-n {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--rc-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.rc-step-t { padding-top: 3px; }

@media (max-width: 520px) {
  .rc-tools { width: 100%; }
  .rc-input { min-width: 0; flex: 1; }
}
