﻿/* Auth modal and auth portal */
.afms-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.afms-auth-modal.is-active {
    display: flex;
}

.afms-auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
}

.afms-auth-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border: 1px solid #d8dde6;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    padding: 24px;
}

.afms-auth-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.afms-auth-modal__close:hover,
.afms-auth-modal__close:focus {
    background: transparent !important;
    color: #0f172a;
    box-shadow: none !important;
}

.afms-auth-modal__intro {
    padding-right: 38px;
}

.afms-auth-modal__intro h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 24px;
}

.afms-auth-modal__intro p {
    margin: 0 0 18px;
    color: #475569;
}

.afms-auth-modal__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.afms-auth-modal__tab {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    cursor: pointer;
}

.afms-auth-modal__tab.is-active {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.afms-auth-modal__panel {
    display: none;
}

.afms-auth-modal__panel.is-active {
    display: block;
}

.afms-auth-modal__form {
    display: grid;
    gap: 14px;
}

.afms-auth-modal__form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-weight: 600;
}

.afms-auth-modal__form input[type="text"],
.afms-auth-modal__form input[type="email"],
.afms-auth-modal__form input[type="password"] {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 9px 12px;
}

.afms-auth-modal__check {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    font-weight: 400 !important;
}

.afms-auth-modal__check input {
    margin: 0;
}

.afms-auth-modal__form button[type="submit"] {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: #2271b1;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.afms-auth-modal__helper {
    color: #2271b1;
    text-align: center;
}

body.afms-auth-modal-open {
    overflow: hidden;
}

.afms-auth-portal {
    width: min(100%, 460px);
    margin: 0 auto;
    border: 1px solid #d8dde6;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 24px;
}

.afms-auth-portal__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.afms-auth-portal__tabs a {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    text-decoration: none;
}

.afms-auth-portal__tabs a.is-active {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.afms-auth-form {
    display: grid;
    gap: 14px;
}

.afms-auth-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-weight: 600;
}

.afms-auth-form input[type="text"],
.afms-auth-form input[type="email"],
.afms-auth-form input[type="password"] {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 9px 12px;
}

.afms-auth-form__check {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    font-weight: 400 !important;
}

.afms-auth-form__check input {
    margin: 0;
}

.afms-auth-form button[type="submit"] {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: #2271b1;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.afms-auth-form__helper {
    color: #2271b1;
    text-align: center;
}

