/* YAROO — komunikat wejściowy i wymagane potwierdzenie dokumentów. */

body.yaroo-legal-consent-open {
    overflow: hidden !important;
}

.yaroo-legal-gate[hidden] {
    display: none !important;
}

.yaroo-legal-gate {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.yaroo-legal-gate__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 5, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.yaroo-legal-gate__dialog {
    position: relative;
    width: min(650px, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: clamp(1.35rem, 4vw, 2.25rem);
    border: 1px solid rgba(255, 122, 0, 0.34);
    border-radius: 24px;
    background:
        radial-gradient(circle at 90% 0%, rgba(255,122,0,.18), transparent 34%),
        linear-gradient(145deg, #18181e, #0f0f13);
    color: #f7f7f8;
    box-shadow: 0 30px 90px rgba(0,0,0,.68), 0 0 45px rgba(255,122,0,.08);
}

.yaroo-legal-gate__eyebrow {
    display: inline-block;
    margin-bottom: .55rem;
    color: #ff9a3d;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .16em;
}

.yaroo-legal-gate__dialog h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.65rem, 5vw, 2.45rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.yaroo-legal-gate__dialog > p {
    margin: .85rem 0 0;
    color: #bdbdc7;
    line-height: 1.65;
}

.yaroo-legal-gate__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin: 1.25rem 0;
}

.yaroo-legal-gate__links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    min-height: 48px;
    padding: .8rem .95rem;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 13px;
    background: rgba(255,255,255,.035);
    color: #fff;
    font-weight: 750;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.yaroo-legal-gate__links a:hover,
.yaroo-legal-gate__links a:focus-visible {
    border-color: rgba(255,122,0,.68);
    background: rgba(255,122,0,.08);
    box-shadow: 0 0 0 3px rgba(255,122,0,.09), 0 0 24px rgba(255,122,0,.13);
    transform: translateY(-1px);
    outline: none;
}

.yaroo-legal-gate__check {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 15px;
    background: rgba(255,255,255,.035);
    color: #f2f2f5;
    font-size: .96rem;
    font-weight: 650;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.yaroo-legal-gate__check:hover,
.yaroo-legal-gate__check:focus-within {
    border-color: rgba(255,122,0,.72);
    background: rgba(255,122,0,.07);
    box-shadow: 0 0 0 3px rgba(255,122,0,.09), 0 0 24px rgba(255,122,0,.13);
}

.yaroo-legal-gate__check input,
.yaroo-checkout-legal__label input {
    flex: 0 0 auto;
    width: 20px !important;
    height: 20px !important;
    min-height: 0 !important;
    margin: .1rem 0 0 !important;
    padding: 0 !important;
    border-radius: 5px;
    accent-color: #ff7a00;
    cursor: pointer;
}

.yaroo-legal-gate__hint {
    margin: .75rem 0 1.15rem !important;
    color: #8f8f99 !important;
    font-size: .79rem;
    line-height: 1.5 !important;
}

.yaroo-legal-gate__accept {
    width: 100%;
    min-height: 50px;
    padding: .85rem 1.25rem;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff7a00, #ff9a3d);
    color: #fff;
    font: inherit;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(255,122,0,.22);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, opacity .2s ease;
}

.yaroo-legal-gate__accept:hover:not(:disabled),
.yaroo-legal-gate__accept:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 17px 34px rgba(255,122,0,.3);
    filter: brightness(1.04);
    outline: 3px solid rgba(255,154,61,.23);
    outline-offset: 3px;
}

.yaroo-legal-gate__accept:disabled {
    opacity: .42;
    cursor: not-allowed;
    filter: grayscale(.25);
    box-shadow: none;
}

/* Klasyczny checkout — pole bezpośrednio nad przyciskiem złożenia zamówienia. */
.woocommerce-checkout .yaroo-checkout-legal {
    margin: 1rem 0 .85rem;
    padding: 1rem;
    border: 1px solid rgba(255,122,0,.28);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(255,122,0,.075), rgba(255,255,255,.025));
    color: #f4f4f6;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.woocommerce-checkout .yaroo-checkout-legal:hover,
.woocommerce-checkout .yaroo-checkout-legal:focus-within,
.woocommerce-checkout .yaroo-checkout-legal.is-accepted {
    border-color: rgba(255,122,0,.7);
    background: rgba(255,122,0,.08);
    box-shadow: 0 0 0 3px rgba(255,122,0,.09), 0 0 26px rgba(255,122,0,.14);
}

.woocommerce-checkout .yaroo-checkout-legal__label {
    display: flex !important;
    align-items: flex-start;
    gap: .75rem;
    margin: 0 !important;
    color: #f4f4f6 !important;
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.5;
    cursor: pointer;
}

.woocommerce-checkout .yaroo-checkout-legal__label a {
    color: #ff9a3d !important;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.woocommerce-checkout .yaroo-checkout-legal__label a:hover,
.woocommerce-checkout .yaroo-checkout-legal__label a:focus-visible {
    color: #fff !important;
    outline: none;
}

.woocommerce-checkout .yaroo-checkout-legal small {
    display: block;
    margin: .55rem 0 0 2.75rem;
    color: #9b9ba5;
    font-size: .76rem;
}

.woocommerce-checkout .yaroo-checkout-legal .required {
    color: #ff9a3d !important;
    text-decoration: none;
}

/* Checkout Block — oficjalne wymagane pole dodatkowe WooCommerce. */
body.woocommerce-checkout .wc-block-components-checkbox:has(input[name="yaroo/legal-documents"]),
body.woocommerce-checkout .wc-block-components-checkbox:has(input[id*="yaroo"][id*="legal-documents"]) {
    padding: 1rem;
    border: 1px solid rgba(255,122,0,.28);
    border-radius: 15px;
    background: rgba(255,122,0,.06);
}

@media (max-width: 560px) {
    .yaroo-legal-gate {
        align-items: end;
        padding: .55rem;
    }

    .yaroo-legal-gate__dialog {
        width: 100%;
        max-height: calc(100vh - 1.1rem);
        border-radius: 20px;
    }

    .yaroo-legal-gate__links {
        grid-template-columns: 1fr;
    }

    .woocommerce-checkout .yaroo-checkout-legal small {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yaroo-legal-gate *,
    .yaroo-checkout-legal {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
