/**
 * Scheda tecnica raw — Azoto
 * File: azoto.css
 * Stili isolati dal prefisso .ap-azoto-element-widget
 */

.ap-azoto-element-widget {
    --ap-azoto-bg: #f7f9fb;
    --ap-azoto-panel: #ffffff;
    --ap-azoto-ink: #15202b;
    --ap-azoto-muted: #5d6b78;
    --ap-azoto-line: rgba(15, 35, 55, 0.12);
    --ap-azoto-accent: #b95cff;
    --ap-azoto-accent-soft: rgba(185, 92, 255, 0.13);
    --ap-azoto-uv: #7a4bd8;
    --ap-azoto-red: #e42e2e;
    --ap-azoto-blue: #356cff;
    --ap-azoto-cyan: #24c7bb;
    --ap-azoto-violet: #8a47ff;
    --ap-azoto-ir: #c9773c;
    --ap-azoto-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-azoto-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-azoto-bg) 100%);
    border: 1px solid var(--ap-azoto-line);
    border-radius: 24px;
    box-shadow: var(--ap-azoto-shadow);
    overflow: hidden;
}

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

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

.ap-azoto-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-azoto-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-azoto-element-number,
.ap-azoto-element-symbol,
.ap-azoto-element-name,
.ap-azoto-element-mass {
    position: relative;
    z-index: 1;
}

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

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

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

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

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

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

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

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

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

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

.ap-azoto-tab,
.ap-azoto-interaction-button,
.ap-azoto-spectrum-button,
.ap-azoto-outside-button {
    border: 1px solid var(--ap-azoto-line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ap-azoto-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-azoto-tab:hover,
.ap-azoto-interaction-button:hover,
.ap-azoto-spectrum-button:hover,
.ap-azoto-outside-button:hover,
.ap-azoto-spectrum-marker:hover {
    transform: translateY(-1px);
    border-color: rgba(185, 92, 255, 0.42);
}

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

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

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

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

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

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

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

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

.ap-azoto-card-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

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

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

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

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

.ap-azoto-visible-spectrum {
    position: relative;
    height: 86px;
    margin: 0.65rem 0 0.55rem;
    border-radius: 16px;
    border: 1px solid rgba(20, 35, 55, 0.18);
    background: linear-gradient(90deg,
        #3f00ff 0%,
        #5b00ff 16%,
        #004dff 22%,
        #00a8ff 29%,
        #00b050 42%,
        #ffe600 50%,
        #ff8b00 58%,
        #d30000 74%,
        #780000 100%);
    box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.22);
}

.ap-azoto-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-azoto-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-azoto-spectrum-marker span {
    position: absolute;
    top: -0.55rem;
    left: 50%;
    transform: translate(-50%, -100%);
    padding: 0.18rem 0.35rem;
    color: var(--ap-azoto-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-azoto-spectrum-marker.is-selected span {
    color: #5d2197;
    border-color: rgba(185, 92, 255, 0.55);
}

.ap-azoto-outside-spectrum {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 1rem 0;
}

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

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

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

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

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

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

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

.ap-azoto-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-azoto-spectrum-data {
    margin-bottom: 0.8rem;
}

.ap-azoto-line-uv { color: var(--ap-azoto-uv); }
.ap-azoto-line-red { --ap-azoto-marker-ink: var(--ap-azoto-red); color: var(--ap-azoto-marker-ink); }
.ap-azoto-line-blue { --ap-azoto-marker-ink: var(--ap-azoto-blue); color: var(--ap-azoto-marker-ink); }
.ap-azoto-line-cyan { --ap-azoto-marker-ink: var(--ap-azoto-cyan); color: var(--ap-azoto-marker-ink); }
.ap-azoto-line-violet { --ap-azoto-marker-ink: var(--ap-azoto-violet); color: var(--ap-azoto-marker-ink); }
.ap-azoto-line-ir { color: var(--ap-azoto-ir); }

.ap-azoto-spectrum-chip.ap-azoto-line-uv,
.ap-azoto-outside-button.ap-azoto-line-uv { background: rgba(122, 75, 216, 0.12); }
.ap-azoto-spectrum-chip.ap-azoto-line-red,
.ap-azoto-spectrum-marker.ap-azoto-line-red { background: var(--ap-azoto-red); }
.ap-azoto-spectrum-chip.ap-azoto-line-blue,
.ap-azoto-spectrum-marker.ap-azoto-line-blue { background: var(--ap-azoto-blue); }
.ap-azoto-spectrum-chip.ap-azoto-line-cyan,
.ap-azoto-spectrum-marker.ap-azoto-line-cyan { background: var(--ap-azoto-cyan); }
.ap-azoto-spectrum-chip.ap-azoto-line-violet,
.ap-azoto-spectrum-marker.ap-azoto-line-violet { background: var(--ap-azoto-violet); }
.ap-azoto-spectrum-chip.ap-azoto-line-ir,
.ap-azoto-outside-button.ap-azoto-line-ir { background: rgba(201, 119, 60, 0.13); }

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

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

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

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

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

.ap-azoto-spectrum-marker {
    width: 15px;
    transform: translateX(-50%);
    box-shadow: none;
}
.ap-azoto-spectrum-marker:hover { transform: translateX(-50%); }
.ap-azoto-visible-spectrum .ap-azoto-spectrum-marker {
    background: linear-gradient(to right, transparent calc(50% - 1.5px),
        var(--ap-azoto-marker-ink) calc(50% - 1.5px), var(--ap-azoto-marker-ink) calc(50% + 1.5px),
        transparent calc(50% + 1.5px));
    filter: drop-shadow(0 0 1px #182337);
}
.ap-azoto-spectrum-marker:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
@media (max-width: 860px) {
    .ap-azoto-spectrum-marker:nth-child(even) span {
        top: auto;
        bottom: .25rem;
        transform: translateX(-50%);
    }
}

.ap-azoto-element-widget [hidden] { display: none !important; }
