/**
 * Scheda tecnica raw — Boro
 * File: idrogeno-scheda-tecnica.css
 * Stili isolati dal prefisso .ap-boro-element-widget
 */

.ap-boro-element-widget {
    --ap-boro-bg: #f7f9fb;
    --ap-boro-panel: #ffffff;
    --ap-boro-ink: #15202b;
    --ap-boro-muted: #5d6b78;
    --ap-boro-line: rgba(15, 35, 55, 0.12);
    --ap-boro-accent: #b95cff;
    --ap-boro-accent-soft: rgba(185, 92, 255, 0.13);
    --ap-boro-uv: #7a4bd8;
    --ap-boro-ha: #e42e2e;
    --ap-boro-hb: #35a9ff;
    --ap-boro-hg: #6e62ff;
    --ap-boro-hd: #8a47ff;
    --ap-boro-ir: #c9773c;
    --ap-boro-radio: #3d9b87;
    --ap-boro-shadow: 0 18px 45px rgba(9, 20, 35, 0.09);

    width: 100%;
    max-width: 100%;
    clear: both;
    margin: 2rem 0;
    padding: clamp(1rem, 2vw, 1.5rem);
    color: var(--ap-boro-ink);
    background:
        radial-gradient(circle at 14% 8%, rgba(185, 92, 255, 0.14), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(160, 220, 255, 0.22), transparent 26%),
        linear-gradient(135deg, #fbfdff 0%, var(--ap-boro-bg) 100%);
    border: 1px solid var(--ap-boro-line);
    border-radius: 24px;
    box-shadow: var(--ap-boro-shadow);
    overflow: hidden;
}

.ap-boro-element-widget * {
    box-sizing: border-box;
}

.ap-boro-element-hero {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
}

.ap-boro-element-symbol-card {
    position: relative;
    min-height: 210px;
    padding: 1.1rem;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.98), rgba(243,247,250,0.92)),
        radial-gradient(circle, rgba(185,92,255,0.24), transparent 60%);
    border: 1px solid rgba(20, 35, 55, 0.16);
    border-radius: 22px;
    overflow: hidden;
}

.ap-boro-element-symbol-card::before {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(185,92,255,0.22), transparent 66%);
    filter: blur(2px);
}

.ap-boro-element-number,
.ap-boro-element-symbol,
.ap-boro-element-name,
.ap-boro-element-mass {
    position: relative;
    z-index: 1;
}

.ap-boro-element-number {
    justify-self: start;
    align-self: start;
    font-size: 0.92rem;
    color: var(--ap-boro-muted);
    font-weight: 700;
}

.ap-boro-element-symbol {
    display: block;
    font-size: clamp(4rem, 8vw, 6.4rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.ap-boro-element-name {
    margin-top: 0.35rem;
    font-size: 1.15rem;
    font-weight: 800;
}

.ap-boro-element-mass {
    margin-top: 0.3rem;
    font-size: 0.92rem;
    color: var(--ap-boro-muted);
}

.ap-boro-element-intro .ap-boro-kicker {
    margin: 0 0 0.3rem;
    color: var(--ap-boro-accent);
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.78rem;
    font-weight: 800;
}

.ap-boro-element-intro h3 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.15;
}

.ap-boro-element-intro p,
.ap-boro-note,
.ap-boro-info-card p,
.ap-boro-interaction-card p,
.ap-boro-spectrum-card p {
    color: var(--ap-boro-muted);
    line-height: 1.65;
}

.ap-boro-element-intro p,
.ap-boro-note-top {
    margin: 0;
}

.ap-boro-element-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1.5rem 0 1rem;
}

.ap-boro-tab,
.ap-boro-interaction-button,
.ap-boro-spectrum-button,
.ap-boro-outside-button,
.ap-boro-spectrum-marker {
    appearance: none;
    font: inherit;
    cursor: pointer;
}

.ap-boro-tab,
.ap-boro-interaction-button,
.ap-boro-spectrum-button,
.ap-boro-outside-button {
    border: 1px solid var(--ap-boro-line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ap-boro-ink);
    border-radius: 999px;
    padding: 0.62rem 0.9rem;
    font-weight: 800;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.ap-boro-tab:hover,
.ap-boro-interaction-button:hover,
.ap-boro-spectrum-button:hover,
.ap-boro-outside-button:hover,
.ap-boro-spectrum-marker:hover {
    transform: translateY(-1px);
    border-color: rgba(185, 92, 255, 0.42);
}

.ap-boro-tab.is-active,
.ap-boro-interaction-button.is-selected,
.ap-boro-spectrum-button.is-selected,
.ap-boro-outside-button.is-selected,
.ap-boro-spectrum-marker.is-selected {
    background: var(--ap-boro-accent-soft);
    border-color: rgba(185, 92, 255, 0.55);
    color: #5d2197;
}

.ap-boro-panel {
    padding: clamp(1rem, 2vw, 1.25rem);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--ap-boro-line);
    border-radius: 20px;
}

.ap-boro-data-grid,
.ap-boro-spectrum-data {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.ap-boro-data-grid-wide,
.ap-boro-spectrum-data {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ap-boro-data-grid div,
.ap-boro-spectrum-data div,
.ap-boro-info-card,
.ap-boro-interaction-card,
.ap-boro-spectrum-card {
    padding: 0.9rem;
    background: linear-gradient(180deg, #ffffff, #f9fbfd);
    border: 1px solid var(--ap-boro-line);
    border-radius: 16px;
}

.ap-boro-data-grid dt,
.ap-boro-spectrum-data dt {
    margin: 0 0 0.25rem;
    color: var(--ap-boro-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.ap-boro-data-grid dd,
.ap-boro-spectrum-data dd {
    margin: 0;
    font-weight: 800;
}

.ap-boro-note {
    margin: 1rem 0 0;
}

.ap-boro-card-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 0.8rem;
}

.ap-boro-info-card h4,
.ap-boro-interaction-card h4,
.ap-boro-spectrum-card h4 {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
}

.ap-boro-info-card h4 span,
.ap-boro-interaction-card h4 span {
    color: var(--ap-boro-accent);
}

.ap-boro-spectrum-stage {
    margin: 1rem 0;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid var(--ap-boro-line);
    border-radius: 18px;
}

.ap-boro-spectrum-scale,
.ap-boro-spectrum-note {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ap-boro-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.ap-boro-visible-spectrum {
    position: relative;
    height: 86px;
    margin: 2.3rem 0 0.55rem;
    border-radius: 16px;
    border: 1px solid rgba(20, 35, 55, 0.18);
    background: linear-gradient(90deg,
        #3f00ff 0%,
        #5b00ff 9%,
        #004dff 24%,
        #00a8ff 37%,
        #00b050 49%,
        #ffe600 63%,
        #ff8b00 76%,
        #d30000 100%);
    box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.22);
}

.ap-boro-visible-spectrum::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(0,0,0,0.14));
    pointer-events: none;
}

.ap-boro-spectrum-marker {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    width: 3px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35), 0 0 15px currentColor;
}

.ap-boro-spectrum-marker span {
    position: absolute;
    top: -0.55rem;
    left: 50%;
    transform: translate(-50%, -100%);
    padding: 0.18rem 0.35rem;
    color: var(--ap-boro-ink);
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(20,35,55,0.14);
    border-radius: 999px;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 900;
}

.ap-boro-spectrum-marker.is-selected span {
    color: #5d2197;
    border-color: rgba(185, 92, 255, 0.55);
}

.ap-boro-outside-spectrum {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 0.65rem;
    margin: 1rem 0;
}

.ap-boro-outside-button,
.ap-boro-spectrum-button,
.ap-boro-interaction-button {
    width: 100%;
    text-align: left;
    border-radius: 14px;
}

.ap-boro-outside-button span,
.ap-boro-spectrum-button span {
    display: block;
    font-weight: 900;
}

.ap-boro-outside-button small,
.ap-boro-spectrum-button small {
    display: block;
    margin-top: 0.2rem;
    color: var(--ap-boro-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.ap-boro-spectrum-layout,
.ap-boro-interaction-layout {
    display: grid;
    grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.ap-boro-spectrum-list,
.ap-boro-interaction-list {
    display: grid;
    gap: 0.55rem;
    align-content: start;
}

.ap-boro-spectrum-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.ap-boro-spectrum-head p {
    margin: 0;
}

.ap-boro-spectrum-chip {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    border-radius: 999px;
    border: 1px solid rgba(20, 35, 55, 0.2);
    box-shadow: 0 0 14px currentColor;
}

.ap-boro-spectrum-data {
    margin-bottom: 0.8rem;
}

.ap-boro-line-uv { color: var(--ap-boro-uv); }
.ap-boro-line-ha { color: var(--ap-boro-ha); }
.ap-boro-line-hb { color: var(--ap-boro-hb); }
.ap-boro-line-hg { color: var(--ap-boro-hg); }
.ap-boro-line-hd { color: var(--ap-boro-hd); }
.ap-boro-line-ir { color: var(--ap-boro-ir); }
.ap-boro-line-radio { color: var(--ap-boro-radio); }

.ap-boro-spectrum-chip.ap-boro-line-uv,
.ap-boro-outside-button.ap-boro-line-uv { background: rgba(122, 75, 216, 0.12); }
.ap-boro-spectrum-chip.ap-boro-line-ha,
.ap-boro-spectrum-marker.ap-boro-line-ha { background: var(--ap-boro-ha); }
.ap-boro-spectrum-chip.ap-boro-line-hb,
.ap-boro-spectrum-marker.ap-boro-line-hb { background: var(--ap-boro-hb); }
.ap-boro-spectrum-chip.ap-boro-line-hg,
.ap-boro-spectrum-marker.ap-boro-line-hg { background: var(--ap-boro-hg); }
.ap-boro-spectrum-chip.ap-boro-line-hd,
.ap-boro-spectrum-marker.ap-boro-line-hd { background: var(--ap-boro-hd); }
.ap-boro-spectrum-chip.ap-boro-line-ir,
.ap-boro-outside-button.ap-boro-line-ir { background: rgba(201, 119, 60, 0.13); }
.ap-boro-spectrum-chip.ap-boro-line-radio,
.ap-boro-outside-button.ap-boro-line-radio { background: rgba(61, 155, 135, 0.13); }

.ap-boro-interaction-card p,
.ap-boro-spectrum-card p,
.ap-boro-info-card p {
    margin: 0.45rem 0 0;
}

@media (max-width: 860px) {
    .ap-boro-element-hero,
    .ap-boro-spectrum-layout,
    .ap-boro-interaction-layout {
        grid-template-columns: 1fr;
    }

    .ap-boro-data-grid,
    .ap-boro-data-grid-wide,
    .ap-boro-spectrum-data,
    .ap-boro-card-row,
    .ap-boro-outside-spectrum {
        grid-template-columns: 1fr;
    }

    .ap-boro-element-symbol-card {
        max-width: 260px;
    }

    .ap-boro-visible-spectrum {
        height: 76px;
    }
}

/* Boro: colori indicativi delle due righe visibili di B II. */
.ap-boro-element-widget { box-sizing: border-box; }
.ap-boro-element-widget [hidden] { display: none !important; }
.ap-boro-element-widget button:focus-visible { outline: 3px solid #613298; outline-offset: 3px; }
.ap-boro-element-widget .ap-boro-line-violet { color: #8045df; }
.ap-boro-element-widget .ap-boro-line-orange { color: #d47112; }
.ap-boro-spectrum-chip.ap-boro-line-violet, .ap-boro-spectrum-marker.ap-boro-line-violet { background: #8045df; }
.ap-boro-spectrum-chip.ap-boro-line-orange, .ap-boro-spectrum-marker.ap-boro-line-orange { background: #ee921e; }
.ap-boro-element-widget .ap-boro-source-note { font-size: 0.85rem; overflow-wrap: anywhere; }
.ap-boro-element-widget .ap-boro-spectrum-note { flex-wrap: wrap; }
