/* Demo del Photo Booth: stesse misure del software vero, schermo verticale 1080x1920 scalato sulla finestra */
@font-face {
    font-family: 'Cabin';
    src: url('../fonts/Cabin.woff2') format('woff2');
    font-weight: 400 700;
    font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: #093146; }

body {
    font-family: 'Cabin', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

img, canvas, video { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }

.hidden { display: none !important; }

/* Barra sopra lo schermo */
.demo-barra {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 12px;
    color: #fff;
}

.demo-barra a { display: flex; color: #fff; text-decoration: none; }

.demo-barra h1 { flex: 1; font-size: 16px; font-weight: 700; text-align: left; }

.demo-esci { font-size: 15px; font-weight: 700; padding: 6px 4px; }

/* Lo schermo riempie la prima vista, il testo sta sotto. svh: non cambia misura quando il telefono nasconde la barra */
.demo-area { position: relative; height: calc(100vh - 44px); height: calc(100svh - 44px); overflow: hidden; }

.demo-info { padding: 48px 16px 28px; color: #303030; font-size: 17px; line-height: 1.5; background: #fbf8f1; }

.demo-info > * { max-width: 960px; margin-inline: auto; }

.demo-info h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.15; color: #093146; }

.demo-info h2 + p { margin-top: 14px; margin-bottom: 30px; }

.demo-info-sezioni { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px 36px; }

.demo-info h3 { margin-bottom: 8px; font-size: 1.15rem; color: #093146; }

.demo-info ul { padding-left: 20px; }

.demo-info li { margin-bottom: 6px; }

.demo-info-invito { margin-top: 34px; font-weight: 700; color: #093146; }

.demo-info-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 16px; }

.demo-info-azioni a { font-weight: 700; color: #093146; }

.demo-info-azioni .demo-info-bottone { padding: 12px 22px; font-size: 14px; letter-spacing: .08em; color: #fff; text-decoration: none; text-transform: uppercase; background: #ef8215; border-radius: 999px; }

.demo-info-legale { margin-top: 44px; font-size: 14px; color: #5c6770; }

.demo-info-legale a { color: inherit; }

.demo-nojs { padding: 24px; color: #fff; text-align: center; }

.flash {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .08s;
}

.flash.on { opacity: 1; transition: none; }

/* Lo schermo */
.st {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1080px;
    height: 1920px;
    margin: -960px 0 0 -540px;
    overflow: hidden;
    background: #fff;
    color: #16384a;
    transform-origin: center center;
}

.home, .cam, .g { position: absolute; inset: 0; }

.home { background: url('sfondo-home.webp') center/cover no-repeat; }

.cam { background: url('sfondo.webp') center/cover no-repeat; }

.logo { position: absolute; top: 60px; left: 50%; width: 422px; transform: translateX(-50%); }

/* Home */
.home-gallery { position: absolute; top: 40px; left: 37px; width: 100px; height: 210px; }

.home-gallery:active { transform: scale(.95); }

.home-gallery-ic { position: absolute; top: 0; left: 3px; width: 93px; }

.home-gallery-arrow { position: absolute; top: 110px; left: 0; width: 100px; }

.home-icons {
    position: absolute;
    top: 1293px;
    left: 50%;
    display: flex;
    gap: 60px;
    justify-content: center;
    align-items: flex-start;
    transform: translateX(-50%);
}

.home-icon { display: flex; flex-direction: column; align-items: center; width: 220px; text-align: center; }

.home-icon img { width: 200px; height: 200px; margin-bottom: 18px; object-fit: contain; }

.home-icon span {
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1px;
    color: #333;
    text-transform: uppercase;
}

.home-prompt {
    position: absolute;
    top: 1576px;
    bottom: 0;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 900px;
    font-size: 80px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    white-space: pre-line;
    transform: translateX(-50%);
}

/* Scatto */
.titolo {
    position: absolute;
    top: 300px;
    left: 0;
    right: 0;
    font-size: 78px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

.titolo.detto { top: 360px; font-size: 60px; text-transform: none; }

.indietro { position: absolute; top: 478px; left: 60px; }

.bt { display: block; height: 94px; filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, .3)); }

.bt:active { transform: translateY(2px); }

.bt img { display: block; height: 94px; }

.btn-print {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    height: 94px;
    padding: 0 46px;
    border-radius: 24px;
    background: #e8821e;
    color: #fff;
    font-size: 44px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, .3));
}

.btn-print:active { transform: translateY(2px); }

.btn-print svg, .g-btn svg { width: 46px; height: 46px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.video {
    position: absolute;
    top: 640px;
    left: 60px;
    width: 960px;
    height: 640px;
    overflow: hidden;
    background: #000;
    border: 14px solid #fff;
    border-radius: 34px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
}

.video.registra { border-color: #e23; }

.video.avviso { animation: bordo 1s infinite; }

@keyframes bordo {
    0%, 100% { box-shadow: 0 0 0 8px rgba(226, 51, 51, .9); }
    50% { box-shadow: 0 0 0 20px rgba(226, 51, 51, .35); }
}

.video video, .video canvas, .video > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

#live { transform: scaleX(-1); }

#fantasma { opacity: .42; transform: scaleX(-1); pointer-events: none; }

#filigrana { pointer-events: none; }

.conto {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 320px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .7);
}

.conto.vedi { display: flex; }

.rec {
    position: absolute;
    top: 22px;
    left: 22px;
    z-index: 4;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e23;
    box-shadow: 0 0 18px #e23;
    animation: lampo 1s infinite;
}

@keyframes lampo { 50% { opacity: .2; } }

.timer {
    position: absolute;
    top: 18px;
    right: 26px;
    z-index: 4;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 3px 12px rgba(0, 0, 0, .7);
}

.timer.avviso { color: #ff5252; }

.play { position: absolute; inset: 0; z-index: 4; width: 130px; height: 130px; margin: auto; }

.avanz { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 18px; background: rgba(255, 255, 255, .25); cursor: pointer; }

.avanz div { width: 0; height: 100%; background: #f9a300; }

.barra {
    position: absolute;
    top: 1346px;
    left: 0;
    right: 0;
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.barra.strip { top: 1560px; }

.barra.palla8 { top: 1640px; }

#bRisultato { flex-wrap: wrap; gap: 24px 40px; }

.barra-foto { flex: 0 0 100%; display: flex; gap: 40px; justify-content: center; }

.btn-scarica { color: #fff; background: #f6b81c; }

.didascalia {
    position: absolute;
    top: 1610px;
    left: 50%;
    width: 820px;
    font-size: 46px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    transform: translateX(-50%);
}

.miniature {
    position: absolute;
    top: 1470px;
    left: 50%;
    display: flex;
    gap: 30px;
    transform: translateX(-50%);
}

.miniature canvas {
    display: block;
    width: 250px;
    height: 166px;
    object-fit: cover;
    border: 3px solid #d3dadf;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
}

.espr { position: absolute; top: 1460px; left: 0; right: 0; display: none; text-align: center; }

.espr.vedi { display: block; }

.espr-emoji { font-size: 250px; line-height: 1; }

.espr-nome { margin-top: 24px; font-size: 56px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

.fx-riga { position: absolute; top: 1541px; left: 60px; display: flex; gap: 30px; width: 960px; }

.fx { width: 168px; text-align: center; }

.fx-mini { display: block; width: 168px; height: 168px; border: 6px solid transparent; border-radius: 18px; background: #ececec; }

.fx.scelto .fx-mini { border-color: #ef8215; }

.fx span {
    display: block;
    margin-top: 14px;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #333;
    text-transform: uppercase;
}

.finale { position: absolute; top: 440px; left: 50%; display: none; height: 1050px; transform: translateX(-50%); }

.finale.vedi { display: block; }

.finale.palla8 { top: 450px; height: 1160px; }

.finale img { display: block; width: auto; height: 100%; background: #fff; border-radius: 18px; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); }

/* Scelte */
.modale {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 26, 34, .8);
}

.modale.vedi { display: flex; }

.modale-dlg { z-index: 50; }

.modale-box { width: 820px; padding: 66px 58px; background: #fff; border-radius: 48px; box-shadow: 0 26px 80px rgba(0, 0, 0, .55); }

.modale-box .tit { margin-bottom: 44px; font-size: 52px; font-weight: 700; letter-spacing: 1px; text-align: center; text-transform: uppercase; }

.riga { display: flex; align-items: center; gap: 38px; width: 100%; margin-top: 20px; padding: 18px 30px; border-radius: 32px; text-align: left; }

.riga:active { background: #f4f7f8; }

.riga img { flex: 0 0 auto; width: 148px; height: 148px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(16, 40, 55, .18)); }

.riga span { font-size: 54px; font-weight: 700; }

/* Spiegazioni */
.intro {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #16384a 0%, #0e2735 100%);
}

.intro-card { width: 860px; padding: 64px 60px 60px; text-align: center; background: #fff; border-radius: 46px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }

.intro-ico { display: block; width: 230px; height: 230px; margin: 0 auto 16px; animation: oscilla 2.4s ease-in-out infinite; }

@keyframes oscilla {
    0%, 100% { transform: translateX(-60px) rotate(-12deg); }
    50% { transform: translateX(60px) rotate(12deg); }
}

.intro-ico-logo { display: block; width: 422px; margin: 0 auto 36px; }

.intro-occhiello { margin-bottom: 8px; font-size: 30px; font-weight: 700; letter-spacing: 5px; color: #e8821e; text-transform: uppercase; }

.intro-card .tit { margin-bottom: 22px; font-size: 64px; font-weight: 700; line-height: 1.1; letter-spacing: 1px; text-transform: uppercase; }

.intro-card p { margin-bottom: 44px; font-size: 38px; font-weight: 500; line-height: 1.35; color: #2b3b46; }

.intro-card .intro-nota { margin: 40px 0 0; font-size: 28px; color: #6b7d86; }

.intro-btn {
    padding: 26px 78px;
    border-radius: 22px;
    background: #e8821e;
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 12px 26px rgba(232, 130, 30, .4);
}

.intro-btn:active { transform: translateY(2px); }

/* Avvisi */
.dlg-box { width: 720px; padding: 56px 50px 44px; text-align: center; background: #fff; border-radius: 30px; box-shadow: 0 22px 64px rgba(0, 0, 0, .5); }

.dlg-ico { display: flex; align-items: center; justify-content: center; width: 110px; height: 110px; margin: 0 auto 24px; font-size: 64px; font-weight: 700; line-height: 1; color: #e8821e; background: #fff1e3; border-radius: 50%; }

.dlg-box .tit { margin-bottom: 18px; font-size: 44px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

.dlg-box p { margin-bottom: 40px; font-size: 32px; line-height: 1.4; color: #2b3b46; white-space: pre-line; }

.dlg-azioni { display: flex; gap: 24px; }

.dlg-azioni button { flex: 1; padding: 24px 0; font-size: 34px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; border-radius: 20px; }

.dlg-azioni button:active { transform: translateY(2px); }

.dlg-no { color: #16384a; background: #eef3f5; }

.dlg-si { color: #fff; background: #e8821e; }

.dlg-box .copie-sotto { margin-bottom: 34px; font-size: 28px; color: #6b7d86; }

.copie-passo { display: flex; align-items: center; justify-content: center; gap: 44px; margin-bottom: 44px; }

.copie-passo button { width: 120px; height: 120px; font-size: 76px; font-weight: 700; line-height: 1; color: #16384a; background: #eef3f5; border-radius: 50%; }

.copie-passo button:disabled { opacity: .32; }

.copie-passo div { min-width: 150px; font-size: 120px; font-weight: 700; font-variant-numeric: tabular-nums; }

.occupato {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 38px;
    background: rgba(12, 26, 34, .62);
    touch-action: none;
}

.occupato.vedi { display: flex; }

.occupato-giro { width: 130px; height: 130px; border: 13px solid rgba(255, 255, 255, .25); border-top-color: #e8821e; border-radius: 50%; animation: giro 1s linear infinite; }

@keyframes giro { to { transform: rotate(360deg); } }

.occupato-testo { font-size: 60px; font-weight: 700; letter-spacing: 2px; color: #fff; }

.occupato-testo i { font-style: normal; animation: punto 1.4s infinite; }

.occupato-testo i:nth-child(3) { animation-delay: .2s; }

.occupato-testo i:nth-child(4) { animation-delay: .4s; }

@keyframes punto { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* Gallery */
.g { display: flex; flex-direction: column; background: #fff; }

.g-testa { flex: 0 0 auto; display: flex; align-items: center; gap: 22px; padding: 26px 30px; border-bottom: 1px solid #e3ebee; }

.g-indietro { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 66px; height: 66px; background: #f4f7f8; border-radius: 15px; }

.g-indietro svg { width: 52%; height: 52%; }

.g-titolo { flex: 1; min-width: 0; }

.g-titolo div { font-size: 16px; font-weight: 700; letter-spacing: 3px; color: #e8821e; text-transform: uppercase; }

.g-titolo strong { font-size: 44px; font-weight: 600; line-height: 1.05; }

.g-data { flex: 0 0 auto; padding: 14px 22px; font-size: 20px; font-weight: 700; letter-spacing: 1px; color: #2b3b46; background: #f4f7f8; border-radius: 999px; }

.g-corpo { flex: 1; display: flex; min-height: 0; }

.g-schede { flex: 0 0 150px; display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; overflow-y: auto; background: #f4f7f8; border-right: 1px solid #e3ebee; }

.g-scheda { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 20px 4px; color: #2b3b46; border-radius: 22px; }

.g-scheda svg { width: 40px; height: 40px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.g-scheda span { font-size: 16px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }

.g-scheda b { position: absolute; top: 12px; right: 26px; display: flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 5px; font-size: 13px; font-weight: 700; color: #fff; background: #16384a; border-radius: 999px; }

.g-scheda.attiva { color: #fff; background: #e8821e; }

.g-scheda.attiva b { color: #e8821e; background: #fff; }

.g-princ { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.g-capo { display: flex; align-items: baseline; justify-content: space-between; padding: 24px 28px 12px; }

.g-capo .tit { font-size: 34px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }

.g-capo span { font-size: 20px; font-weight: 600; color: #6b7d86; }

.g-griglia {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: 20px;
    min-height: 0;
    padding: 12px 28px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.g-casella { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: #c8d3d8; border-radius: 20px; }

.g-casella:active { transform: scale(.97); }

.g-casella img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.g-etichetta { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 6px 12px; font-size: 13px; font-weight: 700; letter-spacing: .6px; color: #fff; text-transform: uppercase; background: #093146; border-radius: 10px; }

.g-etichetta.et-foto { background: #ef8215; }

.g-etichetta.et-strip { background: #1b9cb9; }

.g-etichetta.et-gif { background: #f9b517; }

.g-etichetta.et-boom { color: #093146; background: #8cc8e5; }

.g-ora { position: absolute; left: 12px; bottom: 12px; z-index: 2; font-size: 15px; font-weight: 700; letter-spacing: .5px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }

.g-play { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; }

.g-play span { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; color: #16384a; background: rgba(255, 255, 255, .9); border-radius: 50%; }

.g-play svg { width: 44%; height: 44%; }

.g-vuoto { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 200px 60px 60px; text-align: center; color: #6b7d86; }

.g-vuoto b { font-size: 34px; color: #2b3b46; }

.g-vuoto span { max-width: 26em; font-size: 26px; line-height: 1.5; }

/* Foto a tutto schermo */
.lb { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: #0c1a22; }

.lb-testa { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 26px 30px; color: #fff; }

.lb-tipo { font-size: 15px; font-weight: 700; letter-spacing: 2.5px; color: #e8821e; text-transform: uppercase; }

.lb-data { font-size: 24px; font-weight: 600; }

.lb-chiudi { display: flex; align-items: center; justify-content: center; width: 66px; height: 66px; color: #fff; background: rgba(255, 255, 255, .15); border-radius: 15px; }

.lb-chiudi svg { width: 48%; height: 48%; }

.lb-palco { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 20px 110px; }

.lb-media { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-width: 0; min-height: 0; }

.lb-media > img { max-width: 100%; max-height: 100%; border-radius: 16px; object-fit: contain; }

.lb-film { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: #000; border-radius: 16px; }

.lb-film canvas, .lb-film video, .lb-film > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.lb-film > img { pointer-events: none; }

.lb-nav { position: absolute; top: 50%; z-index: 3; display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; color: #fff; background: rgba(255, 255, 255, .16); border-radius: 50%; transform: translateY(-50%); }

.lb-nav svg { width: 44%; height: 44%; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.lb-prec { left: 16px; }

.lb-succ { right: 16px; }

.lb-azioni { flex: 0 0 auto; display: flex; gap: 26px; justify-content: center; padding: 28px 30px 40px; }

.g-btn { display: flex; align-items: center; justify-content: center; gap: 15px; min-width: 260px; padding: 28px 36px; font-size: 26px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; border-radius: 999px; box-shadow: 0 10px 26px rgba(14, 42, 61, .35); }

.g-btn:active { transform: translateY(3px); }

.g-btn svg { width: 30px; height: 30px; }

.g-btn-stampa { color: #fff; background: #e8821e; }

.g-btn-qr { color: #fff; background: #f6b81c; }

.qr-box { width: 620px; padding: 54px; text-align: center; background: #fff; border-radius: 32px; }

.qr-box .tit { margin-bottom: 16px; font-size: 40px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

.qr-box p { margin-bottom: 28px; font-size: 26px; line-height: 1.4; color: #2b3b46; }

.qr-box img { display: block; width: 360px; height: 360px; margin: 0 auto; image-rendering: pixelated; }

.qr-box .qr-link { display: block; margin-top: 20px; font-size: 28px; font-weight: 700; color: #1b9cb9; }

.qr-chiudi { display: block; margin: 30px auto 0; padding: 20px 54px; font-size: 24px; font-weight: 700; letter-spacing: 1px; color: #fff; text-transform: uppercase; background: #e8821e; border-radius: 18px; }

/* Tele su cui si creano i video da scaricare: lavorano fuori vista */
.tela-nascosta { position: fixed; top: -2000px; left: -2000px; width: 96px; height: 64px; pointer-events: none; }
