.wcpg-prescription-gate {
    clear: both;
    margin: 1rem 0;
}

.wcpg-checkout-prescription-gate {
    clear: both;
    margin: 1.5rem 0;
}

.wcpg-checkout-prescription-gate h3 {
    margin-bottom: 0.75rem;
}

.wcpg-prescription-confirm {
    align-items: flex-start;
    display: flex;
    gap: 0.5rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.wcpg-prescription-confirm input {
    margin-top: 0.2rem;
}

.wcpg-prescription-help {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.45;
    margin: -0.25rem 0 0.75rem;
}

.wcpg-prescription-upload {
    margin-bottom: 0.75rem;
    max-width: 520px;
}

.wcpg-prescription-error {
    color: #b32d2e;
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

form.cart:has(.wcpg-prescription-gate .wcpg-prescription-confirm-input:not(:checked)) .single_add_to_cart_button,
form.cart:has(.wcpg-prescription-gate .wcpg-prescription-confirm-input:not(:checked)) button[type="submit"],
.single_add_to_cart_button.wcpg-prescription-blocked,
button.wcpg-prescription-blocked,
.single_add_to_cart_button[disabled].wcpg-prescription-blocked,
button[disabled].wcpg-prescription-blocked {
    cursor: not-allowed !important;
    opacity: 0.45 !important;
    pointer-events: none;
}

.wcpg-age-gate[hidden] {
    display: none !important;
}

.wcpg-age-gate {
    align-items: center;
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 24px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 999999;
}

.wcpg-age-gate__backdrop {
    background: rgba(13, 17, 23, 0.74);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.wcpg-age-gate__dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    color: #1f2933;
    max-height: calc(100vh - 48px);
    max-width: 560px;
    overflow: auto;
    padding: 28px;
    position: relative;
    width: min(100%, 560px);
}

.wcpg-age-gate__title {
    color: #111827;
    font-size: 24px;
    line-height: 1.25;
    margin: 0 0 14px;
}

.wcpg-age-gate__message {
    color: #374151;
    font-size: 16px;
    line-height: 1.55;
    margin: 0;
}

.wcpg-age-gate__message p {
    margin: 0 0 12px;
}

.wcpg-age-gate__message p:last-child {
    margin-bottom: 0;
}

.wcpg-age-gate__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.wcpg-age-gate__accept,
.wcpg-age-gate__leave {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 15px;
    font-weight: 600;
    justify-content: center;
    line-height: 1.2;
    min-height: 44px;
    padding: 12px 18px;
    text-align: center;
    text-decoration: none;
}

.wcpg-age-gate__accept {
    background: #111827;
    border: 1px solid #111827;
    color: #fff;
    cursor: pointer;
}

.wcpg-age-gate__accept:hover,
.wcpg-age-gate__accept:focus {
    background: #000;
    border-color: #000;
    color: #fff;
}

.wcpg-age-gate__leave {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.wcpg-age-gate__leave:hover,
.wcpg-age-gate__leave:focus {
    border-color: #9ca3af;
    color: #111827;
}

.wcpg-age-gate__accept:focus,
.wcpg-age-gate__leave:focus,
.wcpg-age-gate__dialog:focus {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

body.wcpg-age-gate-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    .wcpg-age-gate {
        padding: 16px;
    }

    .wcpg-age-gate__dialog {
        max-height: calc(100vh - 32px);
        padding: 22px;
    }

    .wcpg-age-gate__title {
        font-size: 21px;
    }

    .wcpg-age-gate__actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.wcpg-admin-prescription {
    margin-top: 0.45rem;
}
