/* Mobile styles - half spacing */
@media (max-width: 29.99em) {
    .usa-checkbox__label {
        margin-top: 5px;
    }

    .usa-form-group {
        margin-top: 15px;
    }

    .usa-fieldset {
        margin-top: 15px;
    }

    .captcha {
        margin-top: 15px;
    }
}

/* Desktop styles - full spacing */
@media (min-width: 30em) {
    .usa-form .usa-input {
        max-width: 800px;
    }

    #edit-5-are-you-the-owner-of-this-resource-or-do-you-have-permission-t {
        max-width: 800px;
    }

    .usa-checkbox__label {
        margin-top: 10px;
    }

    .usa-form-group {
        margin-top: 30px;
    }

    .usa-fieldset {
        margin-top: 30px;
    }

    .captcha {
        margin-top: 30px;
    }
}

.captcha__description {
    display: none;
}

.usa-form {
    max-width: none;
}

.usa-legend {
    max-width: none;
}

.usa-label {
    max-width: none;
}

.fieldset-legend {
    font-weight: bold;
}

.form-required::after {
    display: inline-block;
    margin-right: 0.15em;
    margin-left: 0.15em;
    content: "*";
    color: #d72222;
}

/* Safari-specific dropdown fixes */
select,
.usa-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23565c65' d='M8 12L2 6h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Ensure consistent styling on all devices */
.usa-form select,
.usa-form .usa-select {
    border: 1px solid #565c65;
    border-radius: 0;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.3;
    max-width: 100%;
    width: 100%;
}