/*
 * AttestiAmo — standard pulsanti cromatici glossy 3D
 * Tecnica condivisa: la struttura visiva resta unica; le varianti cambiano
 * esclusivamente le variabili di palette.
 */
.attestiamo-glossy-button[class*="attestiamo-glossy-"] {
    border: 1px solid var(--att-gloss-border);
    color: var(--att-gloss-text, #ffffff);
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(var(--att-gloss-ice-rgb), 0.82) 5%,
            rgba(var(--att-gloss-highlight-rgb), 0.62) 14%,
            rgba(var(--att-gloss-light-rgb), 0.18) 29%,
            rgba(255, 255, 255, 0) 40%),
        radial-gradient(ellipse at 50% 12%,
            var(--att-gloss-light) 0%,
            var(--att-gloss-bright) 31%,
            var(--att-gloss-main) 52%,
            var(--att-gloss-deep) 74%,
            var(--att-gloss-dark) 100%);
    box-shadow:
        inset 0 1px 0 #ffffff,
        inset 0 3px 8px rgba(var(--att-gloss-ice-rgb), 0.76),
        inset 0 -9px 14px rgba(var(--att-gloss-dark-rgb), 0.52),
        0 6px 13px rgba(var(--att-gloss-shadow-rgb), 0.30),
        0 1px 2px rgba(var(--att-gloss-dark-rgb), 0.42);
    text-shadow: var(--att-gloss-text-shadow, 0 1px 2px rgba(var(--att-gloss-dark-rgb), 0.88));
    position: relative;
    top: 0;
    filter: saturate(1) brightness(1);
    transform: translateY(0);
    transition: top 0.22s ease, transform 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease;
}

.attestiamo-glossy-button[class*="attestiamo-glossy-"]:hover,
.attestiamo-glossy-button[class*="attestiamo-glossy-"]:focus-visible {
    border-color: var(--att-gloss-highlight);
    background:
        linear-gradient(180deg,
            #ffffff 0%,
            rgba(var(--att-gloss-ice-rgb), 0.92) 6%,
            rgba(var(--att-gloss-highlight-rgb), 0.72) 15%,
            rgba(var(--att-gloss-light-rgb), 0.22) 30%,
            rgba(255, 255, 255, 0) 41%),
        radial-gradient(ellipse at 50% 10%,
            var(--att-gloss-highlight) 0%,
            var(--att-gloss-bright) 30%,
            var(--att-gloss-main) 51%,
            var(--att-gloss-deep) 73%,
            var(--att-gloss-dark) 100%);
    box-shadow:
        inset 0 1px 0 #ffffff,
        inset 0 4px 9px rgba(var(--att-gloss-ice-rgb), 0.84),
        inset 0 -9px 14px rgba(var(--att-gloss-dark-rgb), 0.48),
        0 9px 18px rgba(var(--att-gloss-deep-rgb), 0.38),
        0 2px 3px rgba(var(--att-gloss-dark-rgb), 0.38);
    filter: saturate(1.08) brightness(1.04);
    top: -2px;
    transform: translateY(-2px);
    outline: 2px solid rgba(var(--att-gloss-highlight-rgb), 0.58);
    outline-offset: 2px;
}

.attestiamo-glossy-button[class*="attestiamo-glossy-"]:active {
    top: 1px;
    transform: translateY(1px);
    filter: saturate(1.02) brightness(0.98);
    box-shadow:
        inset 0 4px 10px rgba(var(--att-gloss-dark-rgb), 0.48),
        inset 0 -2px 5px rgba(var(--att-gloss-highlight-rgb), 0.42),
        0 2px 5px rgba(var(--att-gloss-shadow-rgb), 0.30);
}

.attestiamo-glossy-button[class*="attestiamo-glossy-"]:disabled {
    border-color: #cbd5e0;
    background: #cbd5e0;
    box-shadow: none;
    color: #ffffff;
    text-shadow: none;
    top: 0;
    filter: none;
    transform: none;
    cursor: not-allowed;
}

.attestiamo-glossy-blue {
    --att-gloss-ice: #f5faff;
    --att-gloss-highlight: #8dd4ff;
    --att-gloss-light: #38a9ff;
    --att-gloss-bright: #008cff;
    --att-gloss-main: #006fef;
    --att-gloss-deep: #0046c7;
    --att-gloss-dark: #001f70;
    --att-gloss-border: #8dd4ff;
    --att-gloss-shadow: #00349a;
    --att-gloss-ice-rgb: 245, 250, 255;
    --att-gloss-highlight-rgb: 141, 212, 255;
    --att-gloss-light-rgb: 56, 169, 255;
    --att-gloss-deep-rgb: 0, 70, 199;
    --att-gloss-dark-rgb: 0, 31, 112;
    --att-gloss-shadow-rgb: 0, 52, 154;
}

.attestiamo-glossy-green {
    --att-gloss-ice: #f5ffff;
    --att-gloss-highlight: #a8ff73;
    --att-gloss-light: #62e6b2;
    --att-gloss-bright: #72f000;
    --att-gloss-main: #00b83f;
    --att-gloss-deep: #008f36;
    --att-gloss-dark: #004d2a;
    --att-gloss-border: #a8ff73;
    --att-gloss-shadow: #006b2d;
    --att-gloss-ice-rgb: 245, 255, 255;
    --att-gloss-highlight-rgb: 168, 255, 115;
    --att-gloss-light-rgb: 98, 230, 178;
    --att-gloss-deep-rgb: 0, 143, 54;
    --att-gloss-dark-rgb: 0, 77, 42;
    --att-gloss-shadow-rgb: 0, 107, 45;
}

.attestiamo-glossy-magenta {
    --att-gloss-ice: #ffe1f0;
    --att-gloss-highlight: #ffb6dc;
    --att-gloss-light: #ff4fb3;
    --att-gloss-bright: #ff1493;
    --att-gloss-main: #e6007e;
    --att-gloss-deep: #9e005d;
    --att-gloss-dark: #57002f;
    --att-gloss-border: #ffb6dc;
    --att-gloss-shadow: #9e005d;
    --att-gloss-ice-rgb: 255, 225, 240;
    --att-gloss-highlight-rgb: 255, 182, 220;
    --att-gloss-light-rgb: 255, 79, 179;
    --att-gloss-deep-rgb: 158, 0, 93;
    --att-gloss-dark-rgb: 87, 0, 47;
    --att-gloss-shadow-rgb: 158, 0, 93;
}

.attestiamo-glossy-yellow {
    --att-gloss-ice: #fffdf2;
    --att-gloss-highlight: #fff2a8;
    --att-gloss-light: #ffd95a;
    --att-gloss-bright: #ffc928;
    --att-gloss-main: #f2b705;
    --att-gloss-deep: #c98a00;
    --att-gloss-dark: #7a4b00;
    --att-gloss-border: #fff2a8;
    --att-gloss-shadow: #9a6500;
    --att-gloss-text: #3a2500;
    --att-gloss-text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
    --att-gloss-ice-rgb: 255, 253, 242;
    --att-gloss-highlight-rgb: 255, 242, 168;
    --att-gloss-light-rgb: 255, 217, 90;
    --att-gloss-deep-rgb: 201, 138, 0;
    --att-gloss-dark-rgb: 122, 75, 0;
    --att-gloss-shadow-rgb: 154, 101, 0;
}

.attestiamo-glossy-red {
    --att-gloss-ice: #fff5f5;
    --att-gloss-highlight: #ffb3b3;
    --att-gloss-light: #ff5a5f;
    --att-gloss-bright: #ff2d2d;
    --att-gloss-main: #d71920;
    --att-gloss-deep: #a60014;
    --att-gloss-dark: #57000b;
    --att-gloss-border: #ffb3b3;
    --att-gloss-shadow: #8a0010;
    --att-gloss-ice-rgb: 255, 245, 245;
    --att-gloss-highlight-rgb: 255, 179, 179;
    --att-gloss-light-rgb: 255, 90, 95;
    --att-gloss-deep-rgb: 166, 0, 20;
    --att-gloss-dark-rgb: 87, 0, 11;
    --att-gloss-shadow-rgb: 138, 0, 16;
}

.attestiamo-glossy-gray {
    --att-gloss-ice: #f8fafc;
    --att-gloss-highlight: #e2e8f0;
    --att-gloss-light: #cbd5e1;
    --att-gloss-bright: #94a3b8;
    --att-gloss-main: #64748b;
    --att-gloss-deep: #475569;
    --att-gloss-dark: #1e293b;
    --att-gloss-border: #e2e8f0;
    --att-gloss-shadow: #334155;
    --att-gloss-ice-rgb: 248, 250, 252;
    --att-gloss-highlight-rgb: 226, 232, 240;
    --att-gloss-light-rgb: 203, 213, 225;
    --att-gloss-deep-rgb: 71, 85, 105;
    --att-gloss-dark-rgb: 30, 41, 59;
    --att-gloss-shadow-rgb: 51, 65, 85;
}

/*
 * AttestiAmo — standard pulsante HOME dei tre ambienti.
 * Il corpo riprende il grigio della Home generale; bordo, riflesso e ombra
 * cambiano esclusivamente in base all'identita cromatica dell'ambiente.
 */
.attestiamo-home-button[class*="attestiamo-home-"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-width: 138px;
    margin-left: auto;
    margin-right: auto;
    padding: 11px 28px;
    border: 2px solid var(--att-home-border);
    border-radius: 10px;
    color: #334155;
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(255, 255, 255, 0.58) 16%,
            rgba(255, 255, 255, 0) 39%),
        linear-gradient(135deg, #e0e7ff 0%, #f0f4f8 52%, #dbeafe 100%);
    box-shadow:
        inset 0 1px 0 #ffffff,
        inset 0 4px 8px rgba(255, 255, 255, 0.72),
        inset 0 -7px 12px rgba(100, 116, 139, 0.14),
        0 6px 13px rgba(var(--att-home-shadow-rgb), 0.18),
        0 1px 2px rgba(51, 65, 85, 0.22);
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.92);
    position: relative;
    top: 0;
    filter: saturate(1) brightness(1);
    transform: translateY(0);
    transition: top 0.22s ease, transform 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.attestiamo-home-button[class*="attestiamo-home-"]:hover,
.attestiamo-home-button[class*="attestiamo-home-"]:focus-visible {
    color: #1e293b;
    border-color: var(--att-home-highlight);
    background:
        linear-gradient(180deg,
            #ffffff 0%,
            rgba(255, 255, 255, 0.70) 18%,
            rgba(255, 255, 255, 0) 41%),
        linear-gradient(135deg, #e0e7ff 0%, #f0f4f8 52%, #dbeafe 100%);
    box-shadow:
        inset 0 1px 0 #ffffff,
        inset 0 5px 9px rgba(255, 255, 255, 0.82),
        inset 0 -7px 12px rgba(100, 116, 139, 0.12),
        0 9px 18px rgba(var(--att-home-shadow-rgb), 0.25),
        0 2px 3px rgba(51, 65, 85, 0.20);
    filter: brightness(1.025);
    top: -2px;
    transform: translateY(-2px);
    outline: 2px solid rgba(var(--att-home-focus-rgb), 0.30);
    outline-offset: 2px;
    text-decoration: none;
}

.attestiamo-home-button[class*="attestiamo-home-"]:active {
    top: 1px;
    transform: translateY(1px);
    filter: brightness(0.985);
    box-shadow:
        inset 0 4px 9px rgba(71, 85, 105, 0.18),
        inset 0 -2px 5px rgba(255, 255, 255, 0.64),
        0 2px 5px rgba(var(--att-home-shadow-rgb), 0.18);
}

.attestiamo-home-blue {
    --att-home-border: #006fef;
    --att-home-highlight: #38a9ff;
    --att-home-shadow-rgb: 0, 52, 154;
    --att-home-focus-rgb: 0, 111, 239;
}

.attestiamo-home-green {
    --att-home-border: #00b83f;
    --att-home-highlight: #72f000;
    --att-home-shadow-rgb: 0, 107, 45;
    --att-home-focus-rgb: 0, 184, 63;
}

/* Variante compatta usata nelle barre inferiori di APP_Lavoratori. */
.attestiamo-app-bottom-home {
    min-width: 116px;
    min-height: 42px;
    height: auto !important;
    padding: 8px 22px;
    color: #008f36 !important;
    --att-home-border: #008f36;
    --att-home-highlight: #72f000;
    --att-home-shadow-rgb: 0, 107, 45;
    --att-home-focus-rgb: 0, 143, 54;
}

.attestiamo-home-magenta {
    --att-home-border: #e6007e;
    --att-home-highlight: #ff4fb3;
    --att-home-shadow-rgb: 158, 0, 93;
    --att-home-focus-rgb: 230, 0, 126;
}

@media (prefers-reduced-motion: reduce) {
    .attestiamo-glossy-button[class*="attestiamo-glossy-"],
    .attestiamo-home-button[class*="attestiamo-home-"] { transition: none; }
}
