/**
 * /gestione-invitati/ — page CSS. The replicas and the page language come from product.css:
 * here only how this page lays them out.
 */

/* ── Hero: the couple's list, answering while the page opens. Like the site page's phone,
   the list straddles the coloured field and the cream below. ── */
.gw-gi-hero {
    --gi-overlap: clamp(5rem, 9vw, 8rem);
    --field-inset: 0 0 var(--gi-overlap);
}
.gw-gi-hero__grid { grid-template-columns: minmax(0, 27rem) minmax(0, 28rem); }
.gw-gi-hero__copy { margin-bottom: var(--gi-overlap); }
.gw-gi-list { box-shadow: 0 0 0 1px hsl(var(--gw-border)), 0 40px 80px -36px hsl(266 35% 25% / .45); }
/* The narrow hero column fits the four counters in one row only with a tighter strip. */
.gw-gi-list .gw-rp-dash__stats { gap: .35rem; margin-inline: 1rem; padding: .75rem; }
.gw-gi-list .gw-rp-dash__stat { gap: .4rem; }
.gw-gi-list .gw-rp-dash__stat > i { width: 1.7rem; height: 1.7rem; font-size: .8rem; }
/* Until the Ricci answer, the lines only their answer writes keep their room, unseen. */
.gw-gi-list [data-gw-replied],
.gw-gi-list [data-gw-intol] { opacity: 0; }
.gw-gi-list.is-answered [data-gw-replied],
.gw-gi-list.is-answered [data-gw-intol] { opacity: 1; }

/* ── Sections with copy beside a replica ── */
.gw-gi-modes,
.gw-gi-moments,
.gw-gi-sheet,
.gw-gi-mail { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
@media (min-width: 768px) {
    .gw-gi-care { padding-block: clamp(3rem, 6vw, 5rem); }
}
/* Wider than the duo's default panel: the statistics window holds two cards side by side. */
@media (min-width: 992px) {
    .gw-gi-care .gw-duo { grid-template-columns: auto minmax(0, 36rem); }
}
@media (min-width: 576px) {
    .gw-gi-care .gw-rp-stats__cards { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

/* Two ways to answer: the pills switch the phone between the two first screens. */
/* The facts are their own grid item: on a phone they go below the phone, so the pills
   sit right above the screen they switch and a tap shows its effect. */
.gw-gi-modes__grid {
    display: grid;
    grid-template-columns: minmax(0, 27rem) auto;
    grid-template-areas: "copy phone" "facts phone";
    justify-content: center;
    column-gap: clamp(3rem, 8vw, 6.5rem);
}
.gw-gi-modes__copy { grid-area: copy; align-self: end; }
.gw-gi-modes__facts { grid-area: facts; align-self: start; }
.gw-gi-modes .gw-rp-phone { grid-area: phone; align-self: center; }
.gw-gi-modes__pick { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
/* Both texts share one cell, so the box keeps the height of the longer and nothing below moves. */
.gw-gi-modes__desc { display: grid; margin: 1rem 0 0; font-size: .95rem; line-height: 1.6; color: hsl(var(--gw-muted-fg)); }
.gw-gi-modes__desc span { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .3s ease, visibility .3s; }
.gw-gi-modes__desc span.is-active { visibility: visible; opacity: 1; }
.gw-gi-screen:not(.is-active) { display: none; }
.gw-gi-screen.is-active { animation: gw-gi-screen-in .35s ease; }
@keyframes gw-gi-screen-in { from { opacity: 0; } to { opacity: 1; } }

/* The moments: the guest's step, and the couple's list seen through one moment over its edge. */
.gw-gi-moments__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}
.gw-gi-moments__show { display: grid; grid-template-columns: auto minmax(0, 19rem); justify-content: end; align-items: end; }
.gw-gi-lens { position: relative; z-index: 1; margin: 0 0 -1rem -1.5rem; }
.gw-gi-lens__bar { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; }
.gw-gi-lens__label { font-size: .78rem; font-weight: 600; color: hsl(var(--gw-muted-fg)); }
.gw-gi-lens__pick {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .45rem .75rem;
    border: 1px solid hsl(var(--gw-border));
    border-radius: .5rem;
    font-size: .88rem;
    font-weight: 500;
}
.gw-gi-lens__pick::after { content: ''; width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-25%) rotate(45deg); }

/* The spreadsheet, and the import window over its corner. */
.gw-gi-sheet__grid,
.gw-gi-mail__grid {
    display: grid;
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}
.gw-gi-sheet__grid { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); }
.gw-gi-sheet__show { display: flex; flex-direction: column; }
.gw-rp-import { position: relative; align-self: flex-end; width: min(19rem, 100%); margin-top: -5.5rem; }

/* One send in the history, on the left for once: the page alternates sides. */
.gw-gi-mail__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); }
.gw-gi-mail__show { justify-self: end; width: min(100%, 30rem); }

@media (max-width: 991.98px) {
    .gw-gi-hero__grid,
    .gw-gi-modes__grid,
    .gw-gi-moments__grid,
    .gw-gi-sheet__grid,
    .gw-gi-mail__grid { grid-template-columns: minmax(0, 1fr); row-gap: 2.25rem; }
    .gw-gi-hero__copy { margin-bottom: 0; }
    .gw-gi-hero { --gi-overlap: 14rem; }
    .gw-gi-list { width: 100%; max-width: 34rem; justify-self: center; }
    .gw-gi-modes__grid { grid-template-areas: "copy" "phone" "facts"; }
    .gw-gi-modes .gw-rp-phone--inner { justify-self: center; }
    .gw-gi-modes__facts { margin-top: 0; }
    .gw-gi-sheet__show,
    .gw-gi-mail__show { width: 100%; max-width: 40rem; justify-self: center; }
    .gw-gi-mail__copy,
    .gw-gi-moments__copy { order: -1; }
    .gw-gi-moments__show { justify-content: center; }
}
@media (max-width: 767.98px) {
    .gw-gi-hero { padding-bottom: 2.25rem; }
    .gw-gi-modes,
    .gw-gi-moments,
    .gw-gi-sheet,
    .gw-gi-mail { padding-block: 2.25rem; }
}
/* On a phone only the household that answers stays open: the others show their row, as when closed. */
@media (max-width: 559.98px) {
    .gw-gi-list .gw-rp-hh:not([data-gw-household]) .gw-rp-guest { display: none; }
}
@media (max-width: 575.98px) {
    .gw-gi-hero__cta { display: block; text-align: center; }
    .gw-rp-sheet { margin-right: -1rem; border-radius: .75rem 0 0 .75rem; }
    .gw-gi-moments__show { display: flex; flex-direction: column; align-items: center; }
    .gw-gi-lens { align-self: flex-end; width: calc(100% - 1.5rem); margin: -3rem 0 0; }
    .gw-rp-import { width: calc(100% - 1.5rem); margin: -2.5rem 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .gw-gi-modes__desc span { transition: none; }
    .gw-gi-screen.is-active { animation: none; }
}
