/**
 * Power4U — Pagina Autolettura gas
 * Palette mix di Pagamenti/Moduli/Efficienza.
 *
 * @since 1.6.0
 */

body.rei-static-page--autolettura-gas { background: var(--rei-cream, #F7F6F7); }

.rei-autolettura {
    /* v2.2: transparent — lascia trasparire la filigrana a tema del main */
    background: transparent;
    color: var(--rei-ink, #E60B70);
    position: relative;
    overflow-x: hidden;
    padding-bottom: 80px;
    --rei-red: #D63638;
    --rei-red-deep: #D63638;
}
.rei-autolettura * { box-sizing: border-box; }
.rei-autolettura__container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* DECORAZIONI */
.rei-autolettura__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.rei-autolettura__glow { position: absolute; width: 540px; height: 540px; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.rei-autolettura__glow--tl { top: -180px; left: -180px; background: radial-gradient(circle, rgba(235,84,29,0.55) 0%, rgba(235,84,29,0) 70%); }
.rei-autolettura__glow--tr { top: -200px; right: -200px; background: radial-gradient(circle, rgba(238,157,196,0.45) 0%, rgba(238,157,196,0) 70%); }
.rei-autolettura__glow--bl { bottom: -180px; left: -200px; background: radial-gradient(circle, rgba(238,157,196,0.45) 0%, rgba(238,157,196,0) 70%); }
.rei-autolettura__glow--br { bottom: -180px; right: -180px; background: radial-gradient(circle, rgba(235,84,29,0.55) 0%, rgba(235,84,29,0) 70%); }

.rei-autolettura__particle {
    position: absolute;
    color: var(--rei-green, #EB541D);
    opacity: 0.16;
    pointer-events: none;
    will-change: transform, opacity;
    filter: drop-shadow(0 0 22px rgba(235,84,29, 0.5));
    animation: rei-all-pulse 4s ease-in-out infinite;
}
.rei-autolettura__particle svg { width: 100%; height: 100%; display: block; }
.rei-autolettura__particle--1  { top: 3%;  left: 1%;   width: 200px; height: 200px; animation-delay: 0s; }
.rei-autolettura__particle--2  { top: 11%; right: 2%;  width: 225px; height: 225px; color: var(--rei-yellow, #EE9DC4); filter: drop-shadow(0 0 24px rgba(238,157,196,0.45)); animation-delay: 0.5s; }
.rei-autolettura__particle--3  { top: 23%; left: 6%;   width: 170px; height: 170px; animation-delay: 1s; }
.rei-autolettura__particle--4  { top: 30%; right: 7%;  width: 150px; height: 150px; animation-delay: 1.5s; }
.rei-autolettura__particle--5  { top: 40%; left: 2%;   width: 190px; height: 190px; animation-delay: 2s; }
.rei-autolettura__particle--6  { top: 7%;  left: 43%;  width: 160px; height: 160px; color: var(--rei-yellow, #EE9DC4); filter: drop-shadow(0 0 24px rgba(238,157,196,0.45)); animation-delay: 2.5s; }
.rei-autolettura__particle--7  { top: 51%; right: 3%;  width: 215px; height: 215px; animation-delay: 3s; }
.rei-autolettura__particle--8  { top: 35%; left: 29%;  width: 150px; height: 150px; animation-delay: 3.5s; }
.rei-autolettura__particle--9  { top: 61%; left: 8%;   width: 180px; height: 180px; animation-delay: 0.8s; }
.rei-autolettura__particle--10 { top: 69%; right: 20%; width: 165px; height: 165px; animation-delay: 1.8s; }
.rei-autolettura__particle--11 { top: 47%; left: 47%;  width: 170px; height: 170px; color: var(--rei-yellow, #EE9DC4); filter: drop-shadow(0 0 24px rgba(238,157,196,0.45)); animation-delay: 2.2s; }
.rei-autolettura__particle--12 { top: 79%; left: 31%;  width: 200px; height: 200px; animation-delay: 2.8s; }
.rei-autolettura__particle--13 { top: 87%; right: 5%;  width: 185px; height: 185px; animation-delay: 1.2s; }
.rei-autolettura__particle--14 { top: 92%; left: 4%;   width: 155px; height: 155px; animation-delay: 3.2s; }

@keyframes rei-all-pulse {
    0%   { transform: scale(0.5) rotate(-6deg); opacity: 0.05; }
    50%  { transform: scale(1.1) rotate(5deg);  opacity: 0.20; }
    100% { transform: scale(0.5) rotate(-6deg); opacity: 0.05; }
}
.rei-autolettura > section { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .rei-autolettura__particle { animation: none; opacity: 0.11; } }

/* SEZIONE 1 — HERO */
.rei-autolettura__hero { padding: 72px 0 32px; background: transparent; }
.rei-autolettura__eyebrow {
    display: inline-block; background: #FBD7E9; color: var(--rei-green-deep, #E60B70);
    padding: 8px 22px; border-radius: 999px; font-size: 0.95rem; font-weight: 600;
    margin: 0 0 24px; border: 1px solid rgba(235,84,29,0.25);
}
.rei-autolettura__title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1.15; margin: 0 0 22px; }
.rei-autolettura__title-green { color: var(--rei-green, #EB541D); }
.rei-autolettura__intro p { font-size: 1.05rem; line-height: 1.7; max-width: 880px; margin: 0 0 16px; }

/* BOX "In che casi" */
.rei-autolettura__box-section { padding: 16px 0 40px; background: transparent; }
.rei-autolettura__box {
    background: linear-gradient(160deg, #F7F6F7 0%, #FBE3EF 100%);
    border: 2px solid #EE9DC4;
    border-radius: 14px;
    padding: 32px 36px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.12);
    align-items: start;
    position: relative;
    overflow: hidden;
}
/* v1.21.4: shine hover stile Tutela utenti (giallo soft) */
.rei-autolettura__box::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(238,157,196,0.20) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}
.rei-autolettura__box:hover::before { opacity: 1; }
.rei-autolettura__box-logo,
.rei-autolettura__box-title,
.rei-autolettura__box-text { position: relative; z-index: 1; }
.rei-autolettura__box-logo {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}
.rei-autolettura__box-logo-img {
    height: 34px;
    width: auto;
    display: block;
}
.rei-autolettura__box-title { font-size: 1.3rem; font-weight: 800; color: #E60B70; margin: 0; line-height: 1.3; }
.rei-autolettura__box-text { font-size: 0.98rem; line-height: 1.6; color: #2a2a2a; }
.rei-autolettura__box-text p { margin: 0 0 10px; }
.rei-autolettura__box-text p:last-child { margin-bottom: 0; }

/* SEZIONI TESTO */
.rei-autolettura__come,
.rei-autolettura__comunicare { padding: 32px 0; background: transparent; }
.rei-autolettura__h2 {
    font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800;
    color: var(--rei-green, #EB541D); margin: 0 0 22px;
}
.rei-autolettura__h2--red { color: var(--rei-red, #D63638); }
.rei-autolettura__comunicare-intro { font-size: 1.05rem; line-height: 1.7; max-width: 880px; margin: 0 0 28px; }

/* Contenuto ricco (istruzioni) */
.rei-autolettura__rich { max-width: 920px; font-size: 1.02rem; line-height: 1.7; }
.rei-autolettura__rich p { margin: 0 0 14px; }
.rei-autolettura__rich h3 {
    font-size: 1.1rem; font-weight: 800; color: var(--rei-ink, #E60B70);
    margin: 26px 0 10px;
}
.rei-autolettura__rich ul { margin: 0 0 16px; padding-left: 22px; }
.rei-autolettura__rich li { margin-bottom: 8px; line-height: 1.6; }
.rei-autolettura__rich strong { font-weight: 700; }
.rei-autolettura__rich a { color: var(--rei-green-deep, #E60B70); font-weight: 600; }

/* BOLLETTA su fondo verde */
.rei-autolettura__bolletta {
    background: linear-gradient(135deg, #EB541D 0%, #EB541D 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 0 0 32px;
    box-shadow: 0 16px 40px -12px rgba(235,84,29,0.4);
}
/* v1.7.1: due pagine bolletta affiancate su desktop, impilate su mobile (riempiono il box verde, testo leggibile) */
.rei-autolettura__bolletta-pages { display: flex; gap: 24px; align-items: center; }
.rei-autolettura__bolletta-page { flex: 1 1 0; min-width: 0; }
.rei-autolettura__bolletta-page svg { width: 100%; height: auto; display: block; }

/* SEZIONE 4 — FORM */
.rei-autolettura__form-section { background: #f0f0f0; padding: 64px 0; }
.rei-autolettura__form-title {
    font-size: clamp(1.7rem, 3.8vw, 2.4rem); font-weight: 800;
    color: var(--rei-green, #EB541D); margin: 0 0 18px;
}
.rei-autolettura__form-intro { font-size: 1rem; line-height: 1.65; max-width: 880px; margin: 0 0 28px; color: #444; }
.rei-autolettura__form-intro p { margin: 0 0 12px; }
.rei-autolettura__form-intro strong { color: #222; }

.rei-autolettura__feedback { padding: 14px 18px; border-radius: 10px; margin-bottom: 24px; font-weight: 600; }
.rei-autolettura__feedback.is-ok { background: #FDECF4; color: #E60B70; }
.rei-autolettura__feedback.is-error { background: #fde8e8; color: var(--rei-red-deep, #D63638); }

.rei-autolettura__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rei-autolettura__form-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 32px; margin-bottom: 28px;
}
.rei-autolettura__field { display: flex; flex-direction: column; }
.rei-autolettura__field label { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.rei-autolettura__field .req { color: var(--rei-red, #D63638); }
.rei-autolettura__field input {
    padding: 12px 14px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; background: #fff; width: 100%;
}
.rei-autolettura__field input:focus { outline: none; border-color: var(--rei-green, #EB541D); box-shadow: 0 0 0 3px rgba(235,84,29,0.15); }

/* UPLOAD foto */
.rei-autolettura__uploads {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 32px; margin-bottom: 28px;
}
.rei-autolettura__upload { display: flex; flex-direction: column; }
.rei-autolettura__upload label { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.rei-autolettura__file {
    padding: 10px 12px;
    border: 2px dashed #bbb;
    border-radius: 8px;
    background: #fff;
    font-size: 0.92rem;
    cursor: pointer;
    width: 100%;
}
.rei-autolettura__file::file-selector-button {
    background: var(--rei-green, #EB541D);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 12px;
}
.rei-autolettura__file::file-selector-button:hover { background: var(--rei-green-deep, #E60B70); }
.rei-autolettura__upload.has-file .rei-autolettura__file { border-color: var(--rei-green, #EB541D); border-style: solid; }
.rei-autolettura__file-name { font-size: 0.85rem; color: var(--rei-green-deep, #E60B70); margin-top: 6px; font-weight: 600; word-break: break-all; }

.rei-autolettura__privacy { margin-bottom: 28px; font-size: 0.98rem; line-height: 1.6; }
.rei-autolettura__privacy-label a { color: var(--rei-green-deep, #E60B70); font-weight: 600; }
.rei-autolettura__privacy .req { color: var(--rei-red, #D63638); }
.rei-autolettura__privacy-opts { display: inline-flex; gap: 20px; margin-left: 12px; }
.rei-autolettura__privacy-opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.rei-autolettura__submit-wrap { text-align: center; }
.rei-autolettura__submit {
    background: var(--rei-green, #EB541D); color: #fff; border: none;
    padding: 16px 64px; border-radius: 999px; font-size: 1.1rem; font-weight: 800;
    letter-spacing: 0.04em; cursor: pointer;
    box-shadow: 0 12px 28px -8px rgba(235,84,29,0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.rei-autolettura__submit:hover { background: var(--rei-green-deep, #E60B70); transform: translateY(-2px); }

/* BANNER finale */
.rei-autolettura__banner { background: linear-gradient(135deg, #EB541D 0%, #EB541D 100%); padding: 28px 0; }
.rei-autolettura__banner-inner {
    display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap;
}
.rei-autolettura__banner-text { color: #fff; font-size: 1.3rem; font-weight: 700; }
.rei-autolettura__banner-btn {
    background: #fff; color: var(--rei-green-deep, #E60B70);
    padding: 12px 32px; border-radius: 999px; font-weight: 800; text-decoration: none;
    transition: transform 0.15s ease;
}
.rei-autolettura__banner-btn:hover { transform: translateY(-2px); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .rei-autolettura__container { padding: 0 20px; }
    .rei-autolettura__hero { padding: 48px 0 24px; }
    .rei-autolettura__box { grid-template-columns: 1fr; gap: 16px; padding: 24px; margin-bottom: 40px; }
    .rei-autolettura__form-grid,
    .rei-autolettura__uploads { grid-template-columns: 1fr; }
    .rei-autolettura__form-section { padding: 48px 0; }
    .rei-autolettura__privacy-opts { display: flex; margin-left: 0; margin-top: 10px; }
    .rei-autolettura__submit { width: 100%; padding: 16px; }
    .rei-autolettura__banner-inner { flex-direction: column; gap: 16px; }
    .rei-autolettura__bolletta { padding: 14px; }
    .rei-autolettura__bolletta-pages { flex-direction: column; gap: 16px; align-items: stretch; }
}

/* v1.29.2: stacco card finale dalla bandiera tricolore — override mobile */
@media (max-width: 720px) {
    .rei-autolettura { padding-bottom: 40px !important; }
}


/* ==========================================================================
   v2.0.0 — Switch Luce / Gas della pagina unificata /autolettura/
   ========================================================================== */
.rei-autolettura__switch {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 42px 32px 0;
}
.rei-autolettura__switch-btn {
    appearance: none;
    border: 2px solid var(--rei-ink, #E60B70);
    background: #fff;
    color: var(--rei-ink, #E60B70);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.02em;
    padding: 12px 34px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .18s ease;
}
.rei-autolettura__switch-btn:hover { transform: translateY(-2px); }
.rei-autolettura__switch-btn.is-active--luce {
    background: var(--rei-yellow, #EE9DC4);
    border-color: var(--rei-yellow, #EE9DC4);
}
.rei-autolettura__switch-btn.is-active--gas {
    background: var(--rei-green, #EB541D);
    border-color: var(--rei-green, #EB541D);
    color: #fff;
}
.rei-autolettura__panel[hidden] { display: none; }
