/* Auth Modal Styles */
.auth-modal .auth-modal-dialog {
    max-width: 950px;
}

.auth-modal .auth-modal-content {
    border: none;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(20, 137, 154, 0.25);
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.auth-modal-close .btn-close {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 0.6rem;
}

.auth-modal-left {
    background: #ffffff;
    color: #23313f;
    padding: 3rem 2rem;
    min-height: 100%;
    border-right: 1px solid #eef2f4;
}

.auth-modal-heading {
    color: #14899a;
}

.auth-modal-text {
    color: #5f6c72;
    line-height: 1.6;
}

.auth-modal-logo {
    width: 11rem;
    max-width: 100%;
    height: auto;
}

.auth-modal-highlights li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #56616c;
    display: flex;
    align-items: center;
}

.auth-modal-highlights li i {
    color: #14899a;
}

.auth-modal-right {
    background-color: #ffffff;
}

.auth-modal-body,
.auth-modal .auth-register-form {
    width: 100%;
    max-width: 100%;
}

.auth-modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-modal-title-centered h3 {
    color: #103944;
    font-size: 1.8rem;
}

/* Registration tabs */
.auth-modal .registration-tabs .nav-pills {
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 4px;
}

.auth-modal .registration-tabs .nav-link {
    border-radius: 6px;
    color: #495057;
    font-weight: 500;
    padding: 8px 12px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.auth-modal .registration-tabs .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.5);
    color: #495057;
}

.auth-modal .registration-tabs .nav-link.active {
    background-color: var(--bs-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(20, 137, 154, 0.25);
}

.auth-modal .registration-tabs .nav-link.active:hover,
.auth-modal .registration-tabs .nav-link.active:focus {
    background-color: #0f6b78;
    color: #fff;
}

/* Unified form field styling */
.auth-modal .auth-register-form .form-control,
.auth-modal .auth-register-form .form-select,
.auth-modal .auth-register-form .consultant-languages-toggle,
.auth-modal .auth-register-form .consultant-languages-search,
.auth-modal .form-control,
.auth-modal .form-select,
.auth-modal .consultant-languages-toggle,
.auth-modal .consultant-languages-search {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    width: 100%;
    box-shadow: none;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.25;
    box-sizing: border-box;
}

.auth-modal .form-control:focus,
.auth-modal .form-select:focus,
.auth-modal .consultant-languages-toggle:focus,
.auth-modal .consultant-languages-search:focus {
    border-color: #14899a;
    box-shadow: 0 0 0 0.2rem rgba(20, 137, 154, 0.12);
}

.auth-modal .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    width: 100%;
}

.auth-modal .form-control-lg {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.25;
    border-radius: 0.375rem;
}

/* Submit buttons match field box border and size */
.auth-modal .auth-form .d-grid .btn,
.auth-modal .auth-register-form .d-grid .btn,
.auth-modal .auth-form button[type="submit"],
.auth-modal .auth-register-form button[type="submit"] {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    box-shadow: none !important;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
    font-weight: 600;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal !important;
}

.auth-modal .auth-form .btn-primary,
.auth-modal .auth-register-form .btn-primary {
    background-color: #14899a;
    border-color: #ced4da !important;
    color: #fff;
}

.auth-modal .auth-form .btn-primary:hover,
.auth-modal .auth-register-form .btn-primary:hover {
    background-color: #0f6b78;
    border-color: #ced4da !important;
    color: #fff;
}

.auth-modal .auth-form .btn-primary:focus,
.auth-modal .auth-register-form .btn-primary:focus,
.auth-modal .auth-form .btn-primary:active,
.auth-modal .auth-register-form .btn-primary:active {
    background-color: #0f6b78;
    border-color: #14899a !important;
    box-shadow: 0 0 0 0.2rem rgba(20, 137, 154, 0.12) !important;
    color: #fff;
}

.auth-modal .auth-register-form .btn-outline-dark,
.auth-modal .auth-register-form .btn-warning {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    box-shadow: none !important;
}

.auth-modal .auth-register-form .btn-outline-dark:hover,
.auth-modal .auth-register-form .btn-outline-dark:focus,
.auth-modal .auth-register-form .btn-warning:hover,
.auth-modal .auth-register-form .btn-warning:focus {
    border-color: #14899a !important;
    box-shadow: 0 0 0 0.2rem rgba(20, 137, 154, 0.12) !important;
}

.auth-modal .auth-register-form .row {
    --bs-gutter-x: 1rem;
    margin-left: 0;
    margin-right: 0;
}

.auth-modal .auth-register-form .row > [class*="col-"] {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
}

/* Password field with inline eye icon */
.auth-modal .auth-password-field {
    position: relative;
    width: 100%;
}

.auth-modal .auth-password-field .form-control {
    padding-right: 2.75rem;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

.auth-modal .auth-password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #14899a;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}

.auth-modal .auth-password-toggle:hover,
.auth-modal .auth-password-toggle:focus {
    color: #0f6f7d;
    background: transparent;
    outline: none;
}

.auth-modal .auth-password-toggle i {
    pointer-events: none;
    font-size: 1rem;
    line-height: 1;
}

.auth-form .invalid-feedback {
    display: none;
}

.auth-form.was-validated .form-control:invalid ~ .invalid-feedback,
.auth-form.was-validated .form-select:invalid ~ .invalid-feedback,
.auth-form.was-validated .form-check-input:invalid ~ .invalid-feedback,
.auth-form.was-validated :has(> .auth-password-field > .form-control:invalid) > .invalid-feedback {
    display: block;
}

.auth-form .form-control.is-invalid ~ .invalid-feedback,
.auth-form .form-select.is-invalid ~ .invalid-feedback,
.auth-form .form-check-input.is-invalid ~ .invalid-feedback,
.auth-form :has(> .auth-password-field > .form-control.is-invalid) > .invalid-feedback {
    display: block;
}

.auth-modal .consultant-languages-field {
    width: 100%;
}

.auth-modal .consultant-languages-toggle {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

/* Override global responsive input-group rules inside auth modals */
.auth-modal .input-group {
    width: 100%;
    display: flex !important;
    align-items: stretch;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    gap: 0;
}

.auth-modal .input-group > .form-control,
.auth-modal .input-group > .form-select {
    font-size: 1rem;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-radius: 0.375rem 0 0 0.375rem !important;
    border-right: none !important;
}

.auth-modal .input-group > .btn {
    border: 1px solid #ced4da !important;
    border-left: none !important;
    border-radius: 0 0.375rem 0.375rem 0 !important;
    color: #14899a;
    background-color: #f8fbfc;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.9rem;
    white-space: nowrap;
}

@media (max-width: 991px) {
    .auth-modal .auth-modal-dialog {
        margin: 1rem;
    }

    .auth-modal-left {
        padding: 2rem 1.5rem;
    }

    .auth-modal-logo {
        width: 8.5rem;
    }
}

@media (max-width: 767px) {
    .auth-modal .auth-modal-right {
        overflow: visible;
        padding: 1.25rem 1rem !important;
    }

    .auth-modal .auth-modal-body {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .auth-modal .auth-register-form,
    .auth-modal .auth-register-form .row,
    .auth-modal .auth-register-form .row > [class*="col-"],
    .auth-modal #registerCompanyNameField,
    .auth-modal .consultant-languages-field,
    .auth-modal .auth-password-field,
    .auth-modal .d-grid,
    .auth-modal .form-check {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .auth-modal .auth-register-form .row > [class*="col-"] {
        flex: 0 0 100%;
    }

    .auth-modal .auth-register-form {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-modal .registration-tabs .nav-pills {
        display: flex;
        width: 100%;
        gap: 0.25rem;
    }

    .auth-modal .registration-tabs .nav-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .auth-modal .registration-tabs .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        min-height: 2.75rem;
        padding: 0.5rem 0.35rem;
        font-size: 0.72rem;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .auth-modal .registration-tabs .nav-link i {
        display: none;
    }

    .modal .consultant-languages-field {
        overflow: visible;
    }

    .auth-modal-left {
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .auth-modal-left ul {
        text-align: left;
    }

    .auth-modal-highlights {
        display: none;
    }

    .auth-modal-logo {
        width: 7rem;
    }

    .auth-modal .auth-register-form .form-control,
    .auth-modal .auth-register-form .form-select,
    .auth-modal .auth-register-form .auth-password-field .form-control,
    .auth-modal .auth-register-form .consultant-languages-toggle,
    .auth-modal .form-control-lg {
        height: 44px;
        min-height: 44px;
        max-height: 44px;
        font-size: 16px !important;
        line-height: 1.25;
    }

    .auth-modal .auth-form .d-grid .btn,
    .auth-modal .auth-register-form .d-grid .btn,
    .auth-modal .auth-form button[type="submit"],
    .auth-modal .auth-register-form button[type="submit"] {
        height: 44px;
        min-height: 44px;
        max-height: 44px;
        font-size: 16px !important;
    }

    .auth-modal .form-control,
    .auth-modal .form-select,
    .auth-modal .consultant-languages-toggle {
        min-height: 44px;
    }
}

@media (max-width: 576px) {
    .auth-modal .auth-modal-dialog {
        margin: 0.5rem;
    }

    .auth-modal-left {
        padding: 1.25rem 0.75rem;
    }

    .auth-modal-title-centered h3 {
        font-size: 1.5rem;
    }

    .auth-modal-logo {
        width: 6rem;
    }

    .auth-modal .auth-register-form .row {
        --bs-gutter-x: 0.75rem;
    }
}
