/* ==========================================================================
   Rental Property - sign in and sign up (templates/account/login.liquid,
   register.liquid): the theme's colours and a line on the left, the form on the
   right, as a page; the sign-in block opens in a dialog from every link to the
   sign-in page (theme.js). Loaded on every page, for the dialog.
   ========================================================================== */

.rp-auth-page {
    padding: 48px 0 80px;
    background-color: var(--color-surface);
}

.rp-auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 1000px;
    min-height: 600px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 24px;
    background-color: #FFFFFF;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1);
}

.rp-auth__media {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.rp-auth__tagline {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 36px;
    color: #FFFFFF;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

.rp-auth__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
}

.rp-auth__title {
    margin: 0 0 28px;
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
}

.rp-auth__form form {
    margin: 0;
}

.rp-auth__form .form-group {
    margin-bottom: 14px;
}

.rp-auth__form .form-label,
.rp-auth__form .control-label,
.rp-auth__form label {
    margin-bottom: 6px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 500;
}

.rp-auth__form .form-control,
.rp-auth__form .form-select,
.rp-auth__form select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--color-text) 25%, #FFFFFF);
    border-radius: 10px;
    background: #FFFFFF none;
    box-shadow: none;
    color: var(--color-text);
    font-size: 16px;
}

/* kindshare squares every list and pads it with !important. */
.rp-auth__form select {
    padding: 0 40px 0 16px !important;
    border-radius: 10px !important;
}

/* The status list, drawn by select2. */
.rp-auth__form .select2-container {
    width: 100% !important;
}

.rp-auth__form .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
    height: 52px;
    border: 1px solid color-mix(in srgb, var(--color-text) 25%, #FFFFFF);
    border-radius: 10px;
}

.rp-auth__form .select2-container .select2-selection__rendered {
    padding-left: 16px;
    color: var(--color-text);
    font-size: 16px;
    line-height: 50px;
}

.rp-auth__form .select2-container .select2-selection__arrow {
    top: 0;
    right: 10px;
    height: 50px;
}

/* The anti-robot field the platform hides with a script: hidden before it runs. */
.rp-auth__form #lname-form-group {
    display: none;
}

.rp-auth__form textarea.form-control {
    height: auto;
    min-height: 100px;
    padding: 12px 16px;
}

.rp-auth__form .form-control:focus,
.rp-auth__form select:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.rp-auth__form .text-right {
    text-align: left;
}

.rp-auth__form .btn-primary,
.rp-auth__form button[type=submit] {
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
}

.rp-auth__form .btn-primary:hover,
.rp-auth__form button[type=submit]:hover {
    box-shadow: var(--shadow-md);
}

.rp-auth__form .checkbox,
.rp-auth__form .form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
}

.rp-auth__form .checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 0;
    font-weight: 400;
}

.rp-auth__form .checkbox .form-check {
    margin: 2px 0 0;
}

.rp-auth__form input[type=checkbox] {
    position: static;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--color-primary);
}

.rp-auth__form .form-check-label {
    margin: 0;
    font-weight: 400;
}

.rp-auth__form .notification.error,
.rp-auth__form .alert,
.rp-auth__form .message.error {
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0 0 16px;
    text-align: left;
    animation: none;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    background-color: #FDECEC;
    color: #9B1C1C !important;
    font-size: 14px;
}

.rp-auth__form .notification-msg {
    float: none;
    width: auto;
}

.rp-auth__form .error-message,
.rp-auth__form .invalid-feedback {
    margin-top: 4px;
    color: #B42318;
    font-size: 13px;
}

.rp-auth__form .social-login {
    margin: 20px 0 0;
}

.rp-auth__form .social-login-separator {
    margin: 0 0 16px;
    color: var(--color-text-muted);
}

.rp-auth__form .social-login-btn {
    min-height: 50px;
    border-color: var(--color-border-light);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-size: 15px;
}

.rp-auth__forgot {
    margin: 18px 0 0;
    font-size: 14px;
}

.rp-auth__forgot a {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rp-auth__switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border-light);
    color: var(--color-text-muted);
    font-size: 15px;
}

.rp-auth__switch-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 20px;
    border: 1px solid var(--color-text);
    border-radius: var(--r-md);
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
}

.rp-auth__switch-link:hover,
.rp-auth__switch-link:focus {
    background: var(--color-text);
    color: #FFFFFF;
    text-decoration: none;
}

/* The sign-up form is long: it starts at the top, the picture runs beside it. */
.rp-auth--register .rp-auth__panel {
    justify-content: flex-start;
}

/* The dialog. */
.rp-auth-modal {
    width: min(960px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 24px;
    background: transparent;
}

.rp-auth-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.rp-auth-modal .rp-auth {
    max-width: none;
    min-height: 560px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.rp-auth-modal .rp-auth__title {
    font-size: 28px;
}

.rp-auth-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background-color: #FFFFFF;
    color: var(--color-text);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.rp-auth-modal__close:hover {
    background-color: var(--color-surface);
}

body:has(.rp-auth-modal[open]) {
    overflow: hidden;
}

@media (max-width: 767px) {
    .rp-auth-page {
        padding: 0 0 48px;
        background-color: #FFFFFF;
    }

    .rp-auth-page > .container {
        padding: 0;
    }

    .rp-auth,
    .rp-auth-modal .rp-auth {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .rp-auth__media {
        min-height: 180px;
    }

    .rp-auth__tagline {
        padding: 20px;
        font-size: 22px;
    }

    .rp-auth__panel {
        padding: 28px 20px;
    }

    .rp-auth-modal {
        width: 100vw;
        max-height: 100vh;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .rp-auth-modal .rp-auth {
        height: 100%;
        max-height: 100vh;
    }

    .rp-auth-modal .rp-auth__media {
        display: none;
    }
}
