/* ==========================================================================
   Regolamento Pool — stili circoscritti alle pagine del menu Regolamento.
   Superficie chiara coerente con le pagine editoriali pubbliche.
   ========================================================================== */

.regulation-header {
  padding-top: 2.25rem;
  padding-bottom: 1.5rem;
}

.regulation-breadcrumb {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.regulation-breadcrumb ol {
  color: #64748b;
}

.regulation-breadcrumb a {
  color: #be185d;
  text-decoration: none;
}

.regulation-breadcrumb a:hover {
  color: #9d174d;
}

.regulation-header p[class*="tracking"] {
  color: #be185d;
}

.regulation-header h1 {
  color: #0f172a;
}

.regulation-header > p,
.regulation-header .text-slate-400,
.regulation-header [class*="text-slate-400"] {
  color: #475569;
}

.regulation-header .bg-pink-400 {
  background-color: #f0529b;
  color: #020b1d;
}

.regulation-header .text-slate-500 {
  color: #64748b;
}

/* --- Corpo del documento (superficie chiara) --- */
.regulation-body {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .regulation-body {
    grid-template-columns: 18rem minmax(0, 1fr);
  }
}

/* --- Indice --- */
.regulation-toc {
  border: 1px solid #d8d0c7;
  border-radius: 1rem;
  background-color: #f8f5f0;
  padding: 1rem;
}

@media (min-width: 1024px) {
  .regulation-toc {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
}

.regulation-toc p {
  color: #be185d;
}

.regulation-toc a {
  color: #334155;
  text-decoration: none;
}

.regulation-toc a:hover {
  color: #be185d;
}

/* --- Documento normativo (carta chiara) --- */
.regulation-content {
  border: 1px solid #d8d0c7;
  border-radius: 1rem;
  background-color: #ffffff;
  color: #1e293b;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 1px 2px rgba(2, 6, 23, 0.08);
  overflow-wrap: break-word;
}

@media (min-width: 640px) {
  .regulation-content {
    padding: 2.25rem 2.5rem;
  }
}

.regulation-content {
  font-size: 1rem;
  line-height: 1.75;
}

.regulation-content.rich-text p {
  margin-block: 0.875rem;
  line-height: 1.75;
  color: #1e293b;
}

.regulation-content.rich-text h2,
.regulation-content.rich-text h3,
.regulation-content.rich-text h4 {
  color: #0f172a;
  scroll-margin-top: 1.25rem;
}

.regulation-content.rich-text h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.regulation-content.rich-text h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  line-height: 1.35;
}

.regulation-content.rich-text h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

.regulation-content.rich-text ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-block: 0.75rem;
}

.regulation-content.rich-text ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-block: 0.75rem;
}

.regulation-content.rich-text li {
  margin-block: 0.25rem;
  padding-left: 0.25rem;
}

.regulation-content.rich-text strong {
  font-weight: 600;
  color: #0f172a;
}

.regulation-content.rich-text em {
  font-style: italic;
}

.regulation-content.rich-text a {
  font-weight: 600;
  color: #be185d;
  text-decoration-color: rgba(190, 24, 93, 0.45);
  text-decoration-line: underline;
  text-underline-offset: 2px;
}

.regulation-content.rich-text a:hover {
  color: #9d174d;
}

.regulation-content.rich-text blockquote {
  margin-block: 1rem;
  border-left: 4px solid #f472b6;
  background-color: #fdf2f8;
  padding: 0.75rem 1rem;
  color: #334155;
  font-style: normal;
}

/* --- Tabella responsiva --- */
.regulation-content .table-responsive,
.regulation-content table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.regulation-content table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.regulation-content table th,
.regulation-content table td {
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.625rem;
  text-align: left;
  vertical-align: top;
}

.regulation-content table th {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
}

.regulation-content table caption {
  margin-block: 0.5rem;
  font-weight: 600;
  color: #0f172a;
  text-align: left;
}

/* --- Evidenziazione della ricerca --- */
.regulation-content mark {
  background-color: #fbcfe8;
  color: #500724;
  border-radius: 0.2rem;
  padding: 0 0.05rem;
}

.regulation-content mark[data-active="true"] {
  background-color: #f472b6;
  color: #4a044e;
  outline: 2px solid #be185d;
  outline-offset: 1px;
}

/* --- Ricerca: superficie chiara, bordi grigi, focus rosa --- */
.regulation-search {
  margin-top: 1.5rem;
  border: 1px solid #d8d0c7;
  border-radius: 1rem;
  background-color: #ffffff;
  padding: 1rem;
}

.regulation-search label {
  color: #1e293b;
}

.regulation-search input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  color: #1e293b;
  border: 1px solid #94a3b8;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
}

.regulation-search input[type="search"]::placeholder {
  color: #64748b;
}

.regulation-search input[type="search"]:focus {
  border-color: #f0529b;
  outline: 2px solid rgba(240, 82, 155, 0.55);
  outline-offset: 1px;
}

.regulation-search button {
  border: 1px solid #94a3b8;
  background-color: #f8fafc;
  color: #1e293b;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.regulation-search button:hover {
  border-color: #f0529b;
  color: #be185d;
}

.regulation-search button:focus-visible {
  outline: 2px solid #f0529b;
  outline-offset: 2px;
}

.regulation-search button:disabled {
  color: #94a3b8;
  border-color: #cbd5e1;
  opacity: 0.65;
  cursor: not-allowed;
}

.regulation-search [data-regulation-status],
.regulation-search [data-regulation-count] {
  color: #475569;
}

/* --- Collegamenti tra le pagine --- */
.regulation-crosslinks {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #d8d0c7;
}

.regulation-crosslinks p {
  color: #be185d;
}

.regulation-crosslinks a {
  border: 1px solid #94a3b8;
  color: #334155;
  background-color: #ffffff;
  border-radius: 9999px;
  text-decoration: none;
}

.regulation-crosslinks a:hover {
  border-color: #f0529b;
  color: #be185d;
}

/* Pulsante "Torna su" */
.regulation-body + div button[data-regulation-top],
button[data-regulation-top] {
  border: 1px solid #94a3b8;
  background-color: #ffffff;
  color: #334155;
}

button[data-regulation-top]:hover {
  border-color: #f0529b;
  color: #be185d;
}
