/**
 * DIGIKROM × SZALONA ITALIA — AGE GATE UX 0.1.1
 * Odwzorowanie makiety (477 × 293 px) bez zmiany logiki Age Gate.
 * Selekcja kompatybilna z klasami Age Gate 3.x oraz starszym stylem klas.
 */

/* Tylko widok Age Gate; pozostałe części sklepu nie są modyfikowane. */
html.age-gate__restricted,
html.age-gate-restricted,
body.age-restriction { background: #fff !important; }

:is(.age-gate__wrapper, .age-gate-wrapper) {
    box-sizing: border-box !important;
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 20px !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #fff !important;
    font-family: Montserrat, Arial, sans-serif !important;
    z-index: 2147480000 !important;
}

:is(.age-gate__background-colour, .age-gate-background-colour) {
    background: #fff !important;
    opacity: 1 !important;
}

/* Własna karta: dokładny zakres rozmiarów i proporcje z projektu. */
:is(.age-gate__wrapper, .age-gate-wrapper) .age-gate {
    box-sizing: border-box !important;
    display: block !important;
    width: 477px !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 293px !important;
    margin: auto !important;
    padding: 28px 32px 30px !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 24px !important;
    box-shadow: 0 6px 17px rgba(0, 0, 0, .19) !important;
    color: #132519 !important;
    text-align: center !important;
}

:is(.age-gate__form, .age-gate-form) {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-align: center !important;
}

/* Ikona ostrzeżenia: czerwone koło 48 px z wykrzyknikiem. */
:is(.age-gate__heading, .age-gate-heading) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
    color: #132519 !important;
    text-align: center !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

:is(.age-gate__heading, .age-gate-heading)::before {
    content: "!" !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    flex: 0 0 48px !important;
    margin: 0 auto 20px !important;
    border: 4px solid #df2037 !important;
    border-radius: 50% !important;
    color: #df2037 !important;
    background: #fff !important;
    font: 700 35px/1 Arial, sans-serif !important;
}

:is(.age-gate__heading-title, .age-gate-heading-title,
    .age-gate__headline, .age-gate-headline) {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #132519 !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-align: center !important;
}

/* Opis dwuwierszowy zgodnie z projektem. */
:is(.age-gate__subheadline, .age-gate-subheadline,
    .age-gate__challenge, .age-gate-challenge) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 395px !important;
    margin: 0 auto 24px !important;
    padding: 0 !important;
    color: #303030 !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    text-align: center !important;
}

:is(.age-gate__buttons, .age-gate-buttons) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Figma: potwierdzenie wieku to jedyna widoczna akcja.
   Ukrywanie odmowy umieszczone po wspólnych stylach przycisku niżej. */

:is(.age-gate__submit, .age-gate-submit,
    .age-gate__submit--yes, .age-gate-submit-yes) {
    box-sizing: border-box !important;
    position: relative !important;
    display: inline-flex !important;
    flex: 0 1 auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 17px !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 268px !important;
    min-height: 56px !important;
    height: 56px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    background: #1C7D30 !important;
    border: 0 !important;
    border-radius: 28px 28px 28px 0 !important;
    color: #fff !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-transform: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

/*
 * KLUCZOWA POPRAWKA v0.1.1:
 * Age Gate v3 nadaje obu przyciskom klasę .age-gate__submit,
 * natomiast odmowa ma dodatkowo .age-gate__submit--no.
 * Poprzednie ukrywanie było nad regułą ogólną display:inline-flex!important,
 * która ponownie pokazywała pusty przycisk odmowy (samą strzałkę).
 * Celujemy teraz w oba warianty z wyższą specyficznością i robimy to
 * PO ogólnym stylu przycisku. Nie zmieniamy logiki formularza Age Gate.
 */
:is(.age-gate__buttons, .age-gate-buttons) :is(
    .age-gate__submit.age-gate__submit--no,
    .age-gate-submit.age-gate-submit-no,
    .age-gate__submit--no,
    .age-gate-submit-no
) {
    display: none !important;
    visibility: hidden !important;
}

/* Przycisk potwierdzenia pozostaje jeden i jest centralnie ustawiony. */
:is(.age-gate__buttons, .age-gate-buttons) :is(
    .age-gate__submit.age-gate__submit--yes,
    .age-gate-submit.age-gate-submit-yes,
    .age-gate__submit--yes,
    .age-gate-submit-yes
) {
    flex: 0 0 auto !important;
    margin: 0 auto !important;
}

/* Usuwamy ewentualną ikonę z motywu przed treścią. */
:is(.age-gate__submit, .age-gate-submit)::before { content: none !important; }
:is(.age-gate__submit, .age-gate-submit)::after {
    content: "\2192" !important;
    display: inline-block !important;
    color: #fff !important;
    font: 400 28px/1 Arial, sans-serif !important;
    margin: -2px 0 0 !important;
}

:is(.age-gate__submit, .age-gate-submit):hover,
:is(.age-gate__submit, .age-gate-submit):focus-visible {
    background: #146626 !important;
    color: #fff !important;
}

:is(.age-gate__submit, .age-gate-submit):focus-visible {
    outline: 3px solid #132519 !important;
    outline-offset: 3px !important;
}

/* Nie zasłaniamy ewentualnych błędów weryfikacji. */
:is(.age-gate__errors, .age-gate-errors, .age-gate__error, .age-gate-error) {
    margin: 10px auto !important;
    color: #b81e30 !important;
}

@media (max-width: 520px) {
    :is(.age-gate__wrapper, .age-gate-wrapper) { padding: 16px !important; }
    :is(.age-gate__wrapper, .age-gate-wrapper) .age-gate {
        width: 100% !important;
        min-height: 280px !important;
        padding: 28px 20px !important;
        border-radius: 22px !important;
    }
    :is(.age-gate__submit, .age-gate-submit) {
        min-width: 0 !important;
        width: 100% !important;
        padding: 0 14px !important;
        font-size: 14px !important;
    }
}
