.home-collection-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.home-collection-form h3 {
    color: #1a3c6d;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-field {
    flex: 1;
    position: relative;
}

.form-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-field .required {
    color: red;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.home-collection-form p {
    font-size: 14px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.test-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.test-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #1a3c6d;
}

.test-options input[type="radio"] {
    margin-right: 5px;
    accent-color: #1a3c6d;
}

#test-selection {
    margin-bottom: 15px;
}

#test-selection label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #1a3c6d;
}

#test-selection .select2-container {
    width: 100% !important;
}

#test-selection .select2-selection--multiple {
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 38px;
}

#test-selection .select2-selection__rendered {
    padding: 5px;
}

#test-selection .select2-selection__choice {
    background-color: #e4e4e4;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 13px;
    margin: 2px;
}

#test-selection .select2-selection__choice__remove {
    margin-right: 5px;
}

#test-selection .select2-dropdown .select2-results__option[role="group"] {
    font-weight: bold;
    color: #1a3c6d;
}

#test-selection .select2-results__group {
    font-weight: bold;
    color: #1a3c6d;
    padding: 5px;
}

#test-selection .select2-results__option {
    white-space: normal;
    padding: 6px 8px;
    font-size: 13px;
}

#prescription-upload input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

button[type="submit"] {
    background-color: #1a3c6d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-transform: uppercase;
}

button[type="submit"]:hover {
    background-color: #15325b;
}

.home-collection-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    text-align: center;
}

.home-collection-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.home-collection-error ul {
    margin: 0;
    padding-left: 20px;
}

/* Responsive Styles for Tablets and Mobile Devices */
@media (max-width: 768px) {
    .home-collection-form {
        padding: 15px;
    }

    .home-collection-form h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-field {
        flex: none;
    }

    .form-field input {
        font-size: 13px;
        padding: 8px;
    }

    .form-field .required {
        right: 3px;
    }

    .home-collection-form p {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .test-options {
        flex-direction: column;
        gap: 10px;
    }

    .test-options label {
        font-size: 13px;
    }

    .test-options input[type="radio"] {
        width: 16px;
        height: 16px;
    }

    #test-selection label {
        font-size: 13px;
    }

    #test-selection .select2-selection--multiple {
        min-height: 34px;
    }

    #test-selection .select2-selection__rendered {
        padding: 3px;
    }

    #test-selection .select2-selection__choice {
        padding: 3px 6px;
        font-size: 12px;
    }

    #test-selection .select2-results__option {
        font-size: 12px;
        padding: 4px 6px;
    }

    #prescription-upload input {
        padding: 8px;
        font-size: 13px;
    }

    button[type="submit"] {
        font-size: 14px;
        padding: 8px 16px;
    }

    .home-collection-success,
    .home-collection-error {
        padding: 10px;
        font-size: 13px;
    }
}

/* Additional Adjustments for Very Small Screens */
@media (max-width: 480px) {
    .home-collection-form {
        padding: 10px;
    }

    .home-collection-form h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .form-row {
        gap: 8px;
    }

    .form-field input {
        font-size: 12px;
        padding: 6px;
    }

    .home-collection-form p {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .test-options label {
        font-size: 12px;
    }

    #test-selection label {
        font-size: 12px;
    }

    #test-selection .select2-selection--multiple {
        min-height: 32px;
    }

    #test-selection .select2-selection__rendered {
        padding: 2px;
    }

    #test-selection .select2-selection__choice {
        padding: 2px 5px;
        font-size: 11px;
    }

    #test-selection .select2-results__option {
        font-size: 11px;
        padding: 3px 5px;
    }

    #prescription-upload input {
        font-size: 12px;
        padding: 6px;
    }

    button[type="submit"] {
        font-size: 13px;
        padding: 6px 12px;
    }

    .home-collection-success,
    .home-collection-error {
        font-size: 12px;
        padding: 8px;
    }
}