@media (max-width: 767px) {
    /* Make popup container fit mobile screen */
    #test-form {
        max-width: 100%;
        width: 95%;           /* small margin from edges */
        padding: 10px;
        box-sizing: border-box;
        overflow-x: hidden;   /* prevent horizontal scroll */
    }

    /* Inner popup content */
    #test-form .popup_inner {
        padding: 10px;
        box-sizing: border-box;
        text-align: left;      /* Move all content to left */
    }

    /* Stack columns vertically and fit inside container */
    #test-form .col-xl-6,
    #test-form .col-xl-12 {
        width: 100% !important;
        padding: 0;
        margin-bottom: 10px;
        box-sizing: border-box;
    }

    /* Inputs, selects, textarea and buttons fit */
    #test-form input,
    #test-form select,
    #test-form textarea {
        width: 100% !important;
        font-size: 0.95rem;
        padding: 8px 10px;
        box-sizing: border-box;
    }

    /* Shrink heading slightly and align left */
    #test-form h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
		margin-top: 50px;
        word-wrap: break-word;
        text-align: left;      /* Move heading to left */
    }

    /* Ensure button is fully visible and aligned left */
    #test-form button.boxed-btn3 {
        display: block;          /* block element fills width */
        width: 40% !important;  /* full width of container */
        font-size: 1rem;         /* readable text size */
        padding: 12px 0;         /* vertical padding for tap-friendly size */
        box-sizing: border-box;
        text-align: center;      /* keep text centered */
        margin-top: 10px;   
	  /* spacing from previous field */
    }
    /* Scale down reCAPTCHA */
    #test-form .g-recaptcha {
        transform: scale(0.7);
        transform-origin: 0 0;
        margin-bottom: 10px;
    }
}