/* --- General Form Styling --- */

form {
    height: auto;
    width: 90%;
    max-width: 45rem;
    background-color: rgba(255, 255, 255, 0.13);
    overflow: visible;
    position: relative;
    margin: 2rem auto;
    border-radius: 0.625rem;
    backdrop-filter: blur(0.625rem);
    -webkit-backdrop-filter: blur(0.625rem);
    border: 0.125rem solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 2.5rem rgba(8, 7, 16, 0.6);
    padding: 1.25rem 2.1875rem 2.1875rem 2.1875rem;
}

form * {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.03125rem;
    outline: none;
}

form h4 {
    font-size: 2rem;
    font-weight: 500;
    line-height: 2.625rem;
    text-align: center;
}

/* Base style for form inputs */

.form-control,
.form-select,
.form-check-input {
    display: block;
    width: 100%;
    background-color: #fff;
    border: 0.0625rem solid #ced4da;
    border-radius: 0.1875rem;
    padding: 0.825rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #212529;
    margin-top: 1rem;
    box-sizing: border-box;
}

.form-control::placeholder {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 400;
}

/* File input */

#id_profile_photo {
    margin-top: 0.3125rem;
    color: #fff;
    background-color: transparent;
}

.profile_photo label {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: block;
    width: auto;
}

/* Terms section */

#terms-container {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.terms-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.terms-checkbox-container input {
    width: auto;
    height: auto;
    margin-top: 0;
}

.terms-checkbox-container label {
    margin-top: 0rem;
    margin-left: 1rem;
    white-space: nowrap;
}

/* Autocomplete */

.ui-autocomplete {
    background-color: white;
    color: #272a30;
    border: 0.0625rem solid #ddd;
    max-height: 12.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2000 !important;
    box-sizing: border-box;
}

.ui-autocomplete-input {
    width: 100%;
}

.ui-autocomplete {
    position: absolute;
}

.card-body {
    position: relative;
}

/* ----------------------------- */
/* Bootstrap Modal Fixes */
/* ----------------------------- */

.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.modal-dialog {
    pointer-events: auto;
}

.modal-content {
    border-radius: 0.75rem;
    border: none;
    overflow: hidden;
    background-color: #ffffff;
}

.modal-header {
    background-color: #272a30;
    color: #ffffff;
}

.modal-title {
    color: #ffffff;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    background-color: #272a30;
}

.modal-footer button {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.3125rem;
    cursor: pointer;
}

.modal-footer .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-close {
    filter: invert(1);
}

/* Buttons */

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    font-size: 1rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004d9a;
}

.form-submit-btn {
    text-align: center;
    margin-top: 2rem;
}

/* Responsive */

@media (max-width: 768px) {

    form {
        width: 95%;
        padding: 1.25rem;
    }

    .terms-checkbox-container {
        flex-wrap: wrap;
    }

    .terms-checkbox-container label {
        white-space: normal;
    }
}

#id_captcha_1 {
    margin-top: 2rem;
    width: 11.5rem;
}

#accepted_terms_conditions {
    width: auto;
    margin-top: 0;
}

.form-check-label {
    margin-left: 1rem;
}

#captcha-wrapper {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 10px;
}

#captcha-image-container {
    align-items: center;
}

#captcha-image-container img {
    display: block;
    max-width: none;
}

#refresh-captcha {
    flex-shrink: 0;
    white-space: nowrap;
    margin-bottom: 2rem;
}