.agegate-modal{
width: 100%;
  border: none;
  position: fixed;
  z-index: 99999;
  background: rgba(0,0,0,0.5);
  height: 100%;
  top: 0;
  
}

.agegate-modal .agegate-modal__content-wrapper {  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  width: 90%;      
  max-width: 600px; }

.agegate-modal .cta:focus-visible { outline:1px dashed #000; }

.agegate-modal__content-wrapper{
    background: var(--white);
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.agegate-modal__imagee-wrapper img{
    max-width: 24.7rem;
}

/* =========================
   CHECKBOX
========================= */

.agegate-modal .form-field--checkbox{
    cursor: pointer;
    width: fit-content;
    
}
.agegate-modal .form-field--checkbox .form-field__ghost{
    border: solid 2px var(--black);
        min-width: 2rem;
}

.agegate-modal .form-field--checkbox .form-field__checkbox:checked + span::after{
    content: "✔";
    width: 100%;
}

.agegate-modal .form-field__label::after{
    content: none;
}

/* Checkbox focus state */
.agegate-modal .form-field--checkbox .form-field__checkbox:focus-visible + span{
    outline: 2px solid var(--black);
    outline-offset: 3px;
    border-radius: 2px;
}

/* =========================
   RADIO BUTTON STYLE
========================= */

/* Hide default radio */
.agegate-modal .form-field--radio input[type="radio"]{
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Radio wrapper */
.agegate-modal .form-field--radio{
    position: relative;
    cursor: pointer;
}

/* Label */
.agegate-modal .form-field__radio{
    position: relative;
    padding-left: 34px;
    cursor: pointer;
    font-size: 16px;
    line-height: 20px;
    user-select: none;
    display: inline-flex;
    align-items: center;
    color: var(--black);
    height:auto;
    width:auto;
    opacity:1;
}

/* Outer circle */
.agegate-modal .form-field__radio::before{
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--black);
    border-radius: 50%;
    background: var(--white);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Inner dot */
.agegate-modal .form-field__radio::after{
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--black);
    transition: transform 0.2s ease;
}

/* Checked state */
.agegate-modal .form-field--radio input[type="radio"]:checked + .form-field__radio::after{
    transform: translateY(-50%) scale(1);
}

/* Radio focus state */
.agegate-modal .form-field--radio input[type="radio"]:focus-visible + .form-field__radio::before{
    outline: 2px solid var(--black);
    outline-offset: 3px;
}

/* Optional hover */
.agegate-modal .form-field--radio:hover .form-field__radio::before{
    border-color: var(--black);
}

/* =========================
   GLOBAL FOCUS SAFETY NET
========================= */
@media (max-width: 767px) {

    .agegate-modal {
        padding: 16px;
    }

    .agegate-modal__content-wrapper {
        padding: 24px 16px !important;
    }

    .agegate-modal__imagee-wrapper {
        margin-bottom: 20px;
    }

    .agegate-modal__imagee-wrapper img {
        max-width: 140px;
        width: 100%;
        height: auto;
    }

    .agegate-modal__content {
        margin-bottom: 24px;
    }

    .agegate-modal__cta-wrapper {
        display: flex;
  		align-items: flex-start;  /* aligns checkbox to top of text */
  		gap: 10px; 
    }

    #agegate .cta {
        width: fit-content !important;
        justify-content: center;
    }

    .agegate-modal__radio {
        flex-wrap: wrap;
        gap: 16px;
    }

    .agegate-modal .form-field__wrapper {
        align-items: flex-start;
    }

    .agegate-modal .form-field--checkbox .form-field__ghost {
        flex-shrink: 0;           /* stops checkbox from shrinking */
  		margin-top: 2px;          /* fine-tune vertical alignment */
  		min-width: 20px;
  		height: 20px;
    }
    .agegate-modal .form-field--checkbox .form-field__label {
  		text-align: left;         /* stops text from centering weirdly */
  		line-height: 1.4;
	}
    
    .agegate-modal .form-field--checkbox .form-field__checkbox:checked + span::after{
    content: "✔";
    width: 100%;
	font-size: 1.4rem;
}
}

@media screen and (max-height: 500px) and (orientation: landscape) {
  .agegate-modal__imagee-wrapper img{
  height: auto;
  max-width: 17.7rem;
  }
}