/* ==========================================================
   BOTIA REGULATORY
   Layout only. Visual language deliberately inherits BOTIA.
   ========================================================== */

.reg-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 70px;
}

.reg-brand {
  color: #e6a06b;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
}

.reg-intro {
  padding: 44px 0 24px;
  max-width: 820px;
}

.reg-eyebrow {
  margin: 0 0 8px;
  color: #e6a06b;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.reg-intro h1 {
  margin: 0 0 12px;
  color: #fff3ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(2rem, 4.7vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.reg-intro-text {
  margin: 0;
  max-width: 720px;
  color: #d9a77d;
  font-size: 1rem;
  line-height: 1.7;
}

.reg-notice {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(190,122,72,.25);
  border-left: 3px solid #e6a06b;
  border-radius: 4px 14px 14px 4px;
  background: rgba(255,255,255,.035);
  color: #c9b3a6;
  line-height: 1.6;
}

.reg-notice strong {
  color: #ffd8bd;
}

.reg-section {
  margin-top: 22px;
}

/* Filters use BOTIA panels rather than the old black explorer look. */
.reg-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(135px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 17px;
  border: 1px solid rgba(190,122,72,.20);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
}

.reg-filters label {
  display: grid;
  gap: 6px;
  color: #d9a77d;
  font-size: .76rem;
  font-weight: 700;
}

.reg-filters select,
.reg-filters input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  color: #f2e4dc;
  background: rgba(24,13,13,.96);
  border: 1px solid rgba(190,122,72,.32);
  border-radius: 8px;
  outline: none;
}

.reg-filters select:focus,
.reg-filters input:focus {
  border-color: #e6a06b;
  box-shadow: 0 0 0 2px rgba(230,160,107,.12);
}

.reg-clear {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(190,122,72,.32);
  border-radius: 8px;
  background: rgba(190,122,72,.12);
  color: #ffd8bd;
  font-weight: 700;
  cursor: pointer;
}

.reg-clear:hover {
  background: rgba(190,122,72,.22);
}

.reg-table-wrap {
  margin: 0;
  overflow-x: auto;
  border: 1px solid rgba(190,122,72,.20);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
}

.reg-table {
  margin: 0;
  min-width: 920px;
  background: transparent;
}

.reg-table th {
  background: rgba(190,122,72,.15);
  color: #e6a06b;
  font-weight: 700;
}

.reg-table td {
  color: #f2e4dc;
  vertical-align: top;
}

.reg-table tbody tr {
  cursor: pointer;
  transition: background .16s ease;
}

.reg-table tbody tr:hover {
  background: rgba(230,160,107,.06);
}

.reg-table td small {
  display: block;
  margin-top: 4px;
  color: #b99a88;
  line-height: 1.45;
}

.ingredient-link {
  color: #ffd8bd;
  font-weight: 700;
  text-decoration: none;
}

.ingredient-link:hover {
  color: #fff;
  text-decoration: underline;
}

.reg-source-link {
  color: #e6a06b;
  text-decoration: none;
}

.reg-source-link:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.badge-prohibited,
.badge-revoked {
  background: #8b3a3a;
  color: #fff;
}

.badge-warning {
  background: #9b6a2e;
  color: #fff;
}

.badge-restricted,
.badge-limit {
  background: #7a4a2a;
  color: #fff;
}

.badge-other {
  background: #4a4a6a;
  color: #fff;
}

.badge-current {
  background: #2a6b5a;
  color: #fff;
}

.badge-future,
.badge-transition,
.badge-review {
  background: #6a2a3a;
  color: #fff;
}

.reg-empty {
  padding: 28px 20px;
  text-align: center;
  color: #b99a88;
}

.reg-empty strong,
.reg-empty span {
  display: block;
}

.reg-empty strong {
  color: #ffd8bd;
  margin-bottom: 5px;
}

.reg-method {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid rgba(190,122,72,.2);
}

.reg-method h2 {
  color: #ffe0c7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.reg-method-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}

.reg-method-grid .page-section {
  margin: 0;
}

.reg-method-grid .page-section h3 {
  margin-top: 0;
}

/* Dialog follows BOTIA page cards and buttons. */
dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(190,122,72,.32);
  border-radius: 18px;
  color: #f2e4dc;
  background:
    radial-gradient(circle at top, rgba(112,18,27,.28), transparent 38%),
    linear-gradient(135deg,#100707 0%,#241010 48%,#080505 100%);
}

dialog::backdrop {
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(3px);
}

.reg-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid rgba(190,122,72,.20);
  background: rgba(16,7,7,.96);
}

.reg-dialog-head h2 {
  margin: 0;
  color: #fff3ea;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
}

.reg-dialog-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(190,122,72,.40);
  border-radius: 8px;
  background: rgba(24,13,13,.96);
  color: #e6a06b;
  font-size: 1.5rem;
  cursor: pointer;
}

#detail-content {
  padding: 18px;
}

.reg-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reg-detail-block {
  padding: 15px;
  border: 1px solid rgba(190,122,72,.20);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}

.reg-detail-block.wide {
  grid-column: 1 / -1;
}

.reg-detail-label {
  display: block;
  margin-bottom: 6px;
  color: #e6a06b;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.reg-detail-block p {
  margin: 0;
  color: #f2e4dc;
  line-height: 1.65;
}

.reg-verification {
  color: #ffd8bd;
  font-weight: 700;
}

.reg-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.reg-action {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid rgba(190,122,72,.40);
  border-radius: 8px;
  background: rgba(190,122,72,.20);
  color: #ffd8bd;
  font-weight: 700;
  text-decoration: none;
}

.reg-action:hover {
  background: rgba(190,122,72,.35);
}

/* Home shared footer keeps its own BOTIA design. */
.botia-footer {
  max-width: 1180px !important;
}

/* RTL */
body[dir="rtl"] .reg-page,
body[dir="rtl"] .reg-filters,
body[dir="rtl"] .reg-table th,
body[dir="rtl"] .reg-table td {
  text-align: right;
}

/* Responsive */
@media (max-width: 1100px) {
  .reg-filters {
    grid-template-columns: repeat(3,1fr);
  }

  .reg-search-control {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .reg-page {
    padding-inline: 14px;
  }

  .reg-intro {
    padding-top: 30px;
  }

  .reg-filters {
    grid-template-columns: 1fr 1fr;
  }

  .reg-search-control {
    grid-column: 1 / -1;
  }

  .reg-method-grid {
    grid-template-columns: 1fr;
  }

  .reg-detail-grid {
    grid-template-columns: 1fr;
  }

  .reg-detail-block.wide {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .reg-filters {
    grid-template-columns: 1fr;
  }

  .reg-search-control {
    grid-column: auto;
  }
}
