/* site.css — Filo */

:root {
  --filo-dark: #212121;
  --filo-font-size-base: 16px;
}

.it-card {
  .it-card-body {
    .it-card-text {
      font-size: var(--filo-font-size-base);
    }
  }
}

.bg-dark {
  background-color: var(--filo-dark)!important;
}

a {
  color: var(--bsi-secondary);
}

a:hover {
  color: black;
}

.accordion-button {
  color: var(--bsi-secondary) !important;
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
}

.it-right-zone .it-socials .icon {
  fill: black;
}

/* Code blocks */
pre {
  background: #0d1117;
  color: #c9d1d9;
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: 'Roboto Mono', monospace;
  font-size: .85rem;
  line-height: 1.7;
  margin: .75rem 0;
}

pre.pre-prompt {
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

pre code {
  background: none;
  padding: 0;
  font-size: 1em;
  color: inherit;
}

.pre-wrap {
  position: relative;
}

.pre-wrap pre {
  margin: 0;
}

.copy-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .32);
  color: rgba(255, 255, 255, .75);
  border-radius: 4px;
  padding: .2rem .7rem;
  font-size: .8rem;
  font-family: 'Roboto Mono', monospace;
  cursor: pointer;
  transition: background .15s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.copy-btn.copied {
  background: rgba(0, 200, 80, .5);
  color: #6ee7a0;
}

/* Tool list */
.tool-names {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-names li {
  padding: .2rem 0;
  font-size: 1rem;
}

.tool-names li span {
  display: block;
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
}

.tool-names li::before {
  content: '';
  opacity: .4;
}

/* Dashboard version strip */
.dash-meta {
  display: flex;
  flex-wrap: wrap;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 2rem;
  color: black;
}

.dash-meta-item {
  flex: 1;
  min-width: 120px;
  padding: .875rem 1.25rem;
  border-right: 1px solid #666;
}

.dash-meta-item:last-child {
  border-right: none;
}

@media (max-width: 600px) {
  .dash-meta-item {
    border-right: none;
    border-bottom: 1px solid #666;
  }

  .dash-meta-item:last-child {
    border-bottom: none;
  }
}

.dash-meta-val {
  display: block;
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
}

.dash-meta-label {
  display: block;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--bsi-secondary-color);
  margin-bottom: .2rem;
}

.dash-meta-sub {
  display: block;
  font-family: 'Roboto Mono', monospace;
  font-size: .75rem;
  color: var(--bsi-secondary-color);
}

/* Tabs — base */
ul.nav-tabs {
  flex-wrap: nowrap;
  background-color: inherit;
  margin-bottom: 0 !important;
}

div.tab-content {
  padding: 2rem;
}

ul.nav-tabs button.nav-link {
  background-color: transparent;
}

ul.nav-tabs button.nav-link.active {
  background-color: white;
  color: var(--bsi-secondary);
}

/* Tabs on primary background */
.bg-secondary ul.nav-tabs button.nav-link:not(.active) {
  background-color: transparent;
  color: white;
}

.bg-secondary ul.nav-tabs button.nav-link.active {
  background-color: white;
  color: var(--bsi-secondary) !important;
  border-color: white white white transparent;
}

.bg-secondary div.tab-content {
  background-color: white;
  color: black;
}

/* Components table */
.dash-table-wrap {
  overflow-x: auto;
  width: 100%;
  display: block;
  color: black;
}

#dash-comp-table {
  width: 100%;
  border-collapse: collapse;
}

#dash-comp-table th {
  font-size: .85rem;
  text-align: left;
  padding: .5rem .75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 1px solid #666;
}

#dash-comp-table td {
  font-size: .95rem;
  padding: .45rem .75rem;
  border-bottom: 1px dotted var(--bsi-border-color, #666);
  width: 25%;
}

#dash-comp-table td .badge {
  font-size: .825rem;
  margin-bottom: 3px;
}

#dash-comp-table tr:last-child td {
  border-bottom: none;
}

/* Token + Props tables */
.tok-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.tok-table thead tr {
  border-bottom: 1px solid #666;
}

.tok-table thead th {
  padding: .55rem .9rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: left;
}

.tok-table tbody tr {
  border-bottom: 1px dotted #666;
}

.tok-table tbody tr:last-child {
  border-bottom: none;
}

.tok-table td {
  padding: .55rem .9rem;
  vertical-align: top;
}

.token-name {
  font-family: 'Roboto Mono', monospace;
  font-size: .85rem;
  color: var(--bsi-secondary);
  max-width: 240px;
  min-width: 200px;
  word-break: normal;
}

.token-desc {
  font-size: .85rem;
  color: var(--bsi-secondary-color);
  line-height: 1.5;
  min-width: 200px;
  max-width: 240px;
}

.token-desc {
  font-size: .85rem;
  color: var(--bsi-secondary-color);
  line-height: 1.5;
  min-width: 320px;
}



/* Token resolution chain example */
.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.chain-val {
  font-family: 'Roboto Mono', monospace;
  font-size: .85rem;
  background: #f0f0f0;
  padding: .15rem .45rem;
  border-radius: 3px;
}

.chain-val.resolved {
  background: #d4f0e0;
  color: #1a5c38;
}

.chain-val.mid {
  background: #e8e8e8;
  color: #555;
}

.chain-arr {
  font-size: .72rem;
  color: var(--bsi-secondary-color);
}

.chain-label {
  font-family: 'Roboto Mono', monospace;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--bsi-secondary-color);
  margin-bottom: .5rem;
}

.chain-tool {
  font-family: 'Roboto Mono', monospace;
  font-size: .85rem;
  color: var(--bsi-secondary-color);
  margin-top: .5rem;
  margin-bottom: 0;
}

/* Guidelines */
.gl-tag {
  font-size: .85rem;
  border: 1px solid var(--bsi-border-color);
  color: var(--bsi-secondary-color);
}

.gl-text {
  font-size: 1rem;
  color: var(--bsi-secondary-color);
  line-height: 1.75;
}

.gl-text h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: .65rem 0 .2rem;
  color: var(--bsi-body-color);
}

/* Issue cards */
.issue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.issue-card {
  border: 1px solid black;
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

.issue-repo {
  font-family: 'Roboto Mono', monospace;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--bsi-secondary-color);
  margin-bottom: .4rem;
}

/* Empty / loading state */
.data-empty {
  font-family: 'Roboto Mono', monospace;
  font-size: .85rem;
  color: var(--bsi-secondary-color);
  padding: .5rem 0;
}

/* Footer */
.site-footer {
  padding: 3.5rem 0 2rem;
}

.site-footer a {
  color: black;
}

.site-footer a:hover {
  color: #666;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  margin-bottom: .4rem;
}

/* Readability */
p,
li {
  max-width: 75ch;
  word-break: break-word;
}

/* Design Tokens Italia tab */
.dti-toolbar {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.dti-cats {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.dti-resolved {
  word-break: normal;
  max-width: 240px;
  min-width: 200px;
}

.dti-swatch {
  display: inline-block;
  width: 96px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, .15);
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;
}

/* Tabella DTI — aggiungi colonna visual */

#dti-comp-table thead tr {
  border-bottom: 1px solid #666;
}

#dti-comp-table thead th {
  padding: .55rem .9rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: left;
}

#dti-comp-table td {
  max-width: 180px;
}

.dti-visual {
  text-align: center;
  min-width: 240px;
}

.dti-spacing-visual {
  display: inline-block;
  background: transparent;
  border: 2px solid #ff9500;
  vertical-align: middle;
  margin-right: 0;
  flex-shrink: 0;
}

.dti-fontsize-visual {
  display: inline-block;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  color: var(--bsi-secondary);
  line-height: 1;
  margin-right: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.dti-fontweight-visual {
  display: inline-block;
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  color: var(--bsi-secondary);
  line-height: 1;
  margin-right: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.dti-fontfamily-visual {
  display: inline-block;
  font-size: 16px;
  color: var(--bsi-secondary);
  line-height: 1;
  margin-right: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.dti-radius-visual {
  display: inline-block;
  background: var(--bsi-secondary);
  vertical-align: middle;
  margin-right: 0;
  flex-shrink: 0;
  border: 1px solid rgba(0, 102, 204, 0.3);
}

.dti-border-visual {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0;
  flex-shrink: 0;
}

.dti-shadow-visual {
  display: inline-block;
  width: 50px;
  height: 50px;
  background: white;
  vertical-align: middle;
  margin-right: 0;
  flex-shrink: 0;
}

.dti-elevation-visual {
  display: inline-block;
  width: 50px;
  height: 50px;
  background: white;
  vertical-align: middle;
  margin-right: 0;
  flex-shrink: 0;
}

.dti-resolved {
  display: block;
  gap: 0;
}


/* Workaround BSI 3.x #1726 — it-card-text incorrect font-size */
ul.it-card-list li .it-card-text {
  font-size: 1rem !important;
}

.it-brand-wrapper {
  padding-left: 0;
}

/* Workaround BSI 3.x #1726 — alert-warning on .bg-secondary */
.bg-secondary .alert-warning {
  background-color: #fff3cd;
  color: #664d03;
  border-color: #ffecb5;
}

.bg-secondary .alert-warning .alert-icon {
  fill: #664d03;
}

/* Sticky anchor nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
}

.site-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.site-nav-inner::-webkit-scrollbar {
  display: none;
}

.site-nav-brand {
  font-weight: 700;
  font-size: .9rem;
  margin-right: 1.25rem;
  padding: .65rem 0;
  flex-shrink: 0;
  opacity: 0;
  display: none;
  pointer-events: none;
  transition: opacity .2s;
}

.site-nav.is-sticky .site-nav-brand {
  opacity: 1;
  display: block;
}

.site-nav a {
  display: inline-block;
  color: var(--bsi-secondary);
  padding: .65rem 1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
  font-weight: 600;
}

.site-nav a:hover {
  border-bottom-color: var(--bsi-secondary);
}

it-back-to-top::part(button) {
  background-color: var(--bsi-secondary);
  border: 2px solid white;
}