/* ========================================================
   legal.css — shared styles for Terms & Conditions and
   Privacy Policy pages
   ======================================================== */

/* ── Page wrapper ── */
.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Intro block ── */
.legal-intro {
  background: rgba(193, 18, 31, 0.04);
  border-left: 4px solid var(--primary-color, #C1121F);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin-bottom: 40px;
}

.legal-intro p {
  margin: 0 0 12px;
  line-height: 1.7;
  color: #444;
  font-size: 0.97rem;
}

.legal-intro p:last-child { margin-bottom: 0; }

/* ── Section ── */
.legal-section {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid #f0f0f0;
}

.legal-section:last-of-type { border-bottom: none; }

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin: 20px 0 10px;
}

.legal-section p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #555;
  margin: 0 0 14px;
}

.legal-section p:last-child { margin-bottom: 0; }

/* ── Section number pill ── */
.legal-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color, #C1121F);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 0 6px;
  flex-shrink: 0;
}

/* ── Warning section (allergens) ── */
.legal-section--warning {
  background: #fffbf0;
  border: 1px solid #f0c040;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 48px;
}

.legal-section--warning h2 {
  color: #7a5500;
}

.legal-section--warning p {
  color: #5a4000;
}

/* ── Badge (e.g. "Important") ── */
.legal-badge {
  display: inline-block;
  background: #f59e0b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 4px;
}

/* ── Lists ── */
.legal-list {
  padding-left: 20px;
  margin: 12px 0 14px;
}

.legal-list li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #555;
  margin-bottom: 6px;
}

.legal-list--allergen {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.legal-list--allergen li {
  background: #fff3cd;
  border: 1px solid #f0c040;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #7a5500;
  margin: 0;
}

/* ── Tables ── */
.legal-table-wrap {
  overflow-x: auto;
  margin: 16px 0 20px;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-table thead {
  background: #f7f7f7;
}

.legal-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}

.legal-table td {
  padding: 11px 16px;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  line-height: 1.6;
}

.legal-table tr:last-child td { border-bottom: none; }

.legal-table tr:nth-child(even) td { background: #fafafa; }

/* ── Contact info box ── */
.legal-contact-box {
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 16px 0 20px;
}

.legal-contact-box p {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #444;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-contact-box p:last-child { margin-bottom: 0; }

.legal-contact-box i {
  color: var(--primary-color, #C1121F);
  font-size: 1rem;
  flex-shrink: 0;
}

.legal-contact-box a {
  color: var(--primary-color, #C1121F);
  text-decoration: none;
}

.legal-contact-box a:hover { text-decoration: underline; }

/* ── Rights grid ── */
.legal-rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0 24px;
}

.legal-right {
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 18px 16px;
  transition: box-shadow 0.2s;
}

.legal-right:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.legal-right-icon {
  width: 38px;
  height: 38px;
  background: rgba(193, 18, 31, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.legal-right-icon i {
  color: var(--primary-color, #C1121F);
  font-size: 1.1rem;
}

.legal-right h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px;
}

.legal-right p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #666;
  margin: 0;
}

/* ── Inline note ── */
.legal-note {
  font-size: 0.88rem !important;
  color: #888 !important;
  font-style: italic;
  padding: 10px 14px;
  background: #f7f7f7;
  border-radius: 6px;
  margin-top: 12px !important;
}

/* ── Footer note (bottom of page) ── */
.legal-footer-note {
  margin-top: 48px;
  padding: 20px 24px;
  background: #f7f7f7;
  border-radius: 10px;
  text-align: center;
}

.legal-footer-note p {
  font-size: 0.9rem;
  color: #777;
  margin: 0;
}

.legal-footer-note a {
  color: var(--primary-color, #C1121F);
  text-decoration: none;
  font-weight: 600;
}

.legal-footer-note a:hover { text-decoration: underline; }

/* ── Links within legal text ── */
.legal-section a {
  color: var(--primary-color, #C1121F);
  text-decoration: none;
  font-weight: 500;
}

.legal-section a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .legal-page { padding: 32px 16px 60px; }
  .legal-rights-grid { grid-template-columns: 1fr 1fr; }
  .legal-section h2 { font-size: 1.1rem; }
  .legal-table th,
  .legal-table td { padding: 9px 12px; }
}

@media (max-width: 420px) {
  .legal-rights-grid { grid-template-columns: 1fr; }
  .legal-list--allergen li { font-size: 0.82rem; }
}
