/* ------------------------------------------------------------------
 * Ajándékutalvány-kártya
 *
 * Ugyanaz a kártya, ami korábban szerveren generált 1,1 MB-os képként
 * jött: itt HTML, tehát éles minden kijelzőn, gépelés közben frissül, és
 * nem terheli sem a szervert, sem a hálózatot.
 *
 * A méretezés konténer-egységekben (cqw) megy, így a kártya ugyanúgy néz
 * ki 320 px-en és 1200 px-en is. Keskeny helyen álló elrendezésre vált,
 * mert a fekvő kártya telefonon olvashatatlanul kicsi lenne.
 *
 * Színek a sablonképből mintavételezve, hogy a kiküldött (képként
 * generált) utalvány és a képernyőn látható előnézet egyezzen.
 * ------------------------------------------------------------------ */

.cf-gift {
    --cf-gift-bg: #c98173;
    --cf-gift-pill: #ca674a;
    --cf-gift-ink: #001114;
    --cf-gift-card: #ffffff;

    container-type: inline-size;
    position: relative;
    width: 100%;
    background-color: var(--cf-gift-bg);
    border-radius: 1.5cqw;
    padding: 4.5cqw;
    overflow: hidden;
}

.cf-gift__card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3cqw;
    align-items: center;
    background-color: var(--cf-gift-card);
    border-radius: 3cqw;
    padding: 4cqw 3.5cqw;
}

/* A karácsonyi általános kártyán nincs játék, egy oszlop elég. */
.cf-gift--karacsony-altalanos .cf-gift__card {
    grid-template-columns: 1fr;
}

/* ---------------------------------------------------------- bal oszlop */

.cf-gift__left {
    text-align: center;
    min-width: 0;
}

.cf-gift__game {
    font-family: 'Anton', sans-serif;
    font-size: 4.6cqw;
    line-height: 1.1;
    color: var(--cf-gift-ink);
    margin: 0 0 0.6cqw;
    /* Hosszú játéknév ne törje szét az elrendezést. */
    overflow-wrap: anywhere;
}

.cf-gift__city {
    font-family: 'Anton', sans-serif;
    font-size: 3cqw;
    line-height: 1.1;
    color: var(--cf-gift-ink);
    margin: 0 0 2.2cqw;
}

.cf-gift__cover {
    position: relative;
    width: 100%;
    max-width: 34cqw;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border-radius: 1cqw;
    overflow: hidden;
}

.cf-gift__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cf-gift__snow {
    position: absolute;
    inset: 0;
    opacity: 0.65;
    pointer-events: none;
}

/* --------------------------------------------------------- jobb oszlop */

.cf-gift__right {
    min-width: 0;
    text-align: center;
}

.cf-gift__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 4.4cqw;
    line-height: 1.1;
    color: var(--cf-gift-ink);
    margin: 0 0 2.2cqw;
}

.cf-gift__row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1.2cqw;
    background-color: var(--cf-gift-pill);
    border-radius: 0.8cqw;
    padding: 1.1cqw 1.8cqw;
    margin: 0 0 1.4cqw;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.7cqw;
    line-height: 1.25;
    min-height: 1em;
}

.cf-gift__label {
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
}

.cf-gift__value {
    color: var(--cf-gift-ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.cf-gift__row--name {
    justify-content: center;
}

.cf-gift__row--name .cf-gift__value {
    font-weight: 700;
}

.cf-gift__row--url {
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.cf-gift__logo {
    display: block;
    width: 100%;
    max-width: 26cqw;
    height: auto;
    margin: 2.4cqw auto 1.2cqw;
}

.cf-gift__www {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.4cqw;
    letter-spacing: 0.04em;
    color: var(--cf-gift-ink);
    text-transform: uppercase;
    margin: 0;
}

/* -------------------------------------------------------------- MINTA */

.cf-gift__minta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    font-family: 'Anton', sans-serif;
    font-size: 26cqw;
    letter-spacing: 0.08em;
    color: #000000;
    opacity: 0.14;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

/* ------------------------------------------- keskeny helyen álló kártya */

@container (max-width: 560px) {
    .cf-gift {
        padding: 5cqw;
    }

    .cf-gift__card {
        grid-template-columns: 1fr;
        gap: 4cqw;
        padding: 6cqw 5cqw;
    }

    .cf-gift__game {
        font-size: 8cqw;
    }

    .cf-gift__city {
        font-size: 5.4cqw;
    }

    .cf-gift__cover {
        max-width: 56cqw;
    }

    .cf-gift__title {
        font-size: 7.6cqw;
    }

    .cf-gift__row {
        font-size: 4.6cqw;
        border-radius: 1.6cqw;
        padding: 2cqw 3cqw;
        margin-bottom: 2.4cqw;
    }

    .cf-gift__logo {
        max-width: 46cqw;
    }

    .cf-gift__www {
        font-size: 4.2cqw;
    }

    .cf-gift__minta {
        font-size: 40cqw;
    }
}

/* ------------------------------------------------------------------
 * Az űrlapba ágyazott élő előnézet és a teljes képernyős nagyítás.
 * ------------------------------------------------------------------ */

/* Amíg az Alpine be nem töltött, a rejtett elem ne villanjon fel. */
[x-cloak] {
    display: none !important;
}

.cf-gift-zoom {
    position: fixed;
    inset: 0;
    /* A site-header z-index-e 100000; e nelkul a fejlec a nagyitas FOLE kerulne,
       es a bezaro gomb elerhetetlen lenne - pontosan az a hiba, ami a regi
       felugronal is volt. */
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cf-gift-zoom__inner {
    width: min(100%, 1100px);
    margin: auto;
}

/* A letöltő gombok a nagyításban vannak, hogy az űrlap tiszta maradjon. */
.cf-gift-zoom__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cf-gift-zoom__actions > * {
    flex: 0 1 14rem;
}

.cf-gift-zoom__close {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 100011;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.45);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.cf-gift-zoom__close:hover,
.cf-gift-zoom__close:focus {
    background-color: rgba(0, 0, 0, 0.7);
    outline: none;
}
