/* TeleLive — login / register popup */
.tl-login-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.tl-login-modal[hidden] { display: none !important; }
.tl-login-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}
.tl-login-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    max-height: min(92vh, 760px);
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #12151a;
    padding: 22px 20px 18px;
    color: #efeff1;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.tl-login-modal__close {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #c4c4cc;
    cursor: pointer;
}
.tl-login-modal__close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.tl-login-modal__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 4px 0 16px;
    padding-inline-end: 28px;
    min-height: 44px;
}
.tl-login-modal__logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
.tl-login-modal__logo-word {
    height: 28px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
.tl-login-modal__logo-fa,
.tl-login-modal__logo-en {
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    color: #fff;
}
.tl-login-modal__logo-fa span,
.tl-login-modal__logo-en span {
    color: #1e56f5;
}

.tl-login-modal__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0 0 16px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
}
.tl-login-modal__tabs:has(> :only-child) {
    grid-template-columns: 1fr;
}
.tl-login-modal__tab {
    appearance: none;
    border: 0;
    border-radius: 9px;
    min-height: 38px;
    background: transparent;
    color: #9aa3b2;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
.tl-login-modal__tab.is-active {
    background: #1e56f5;
    color: #fff;
}

.tl-login-modal__panels { position: relative; }
.tl-login-modal__panel {
    animation: tlLoginPanelIn 0.28s ease both;
}
.tl-login-modal__panel[hidden] { display: none !important; }
@keyframes tlLoginPanelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.tl-login-modal__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #9aa3b2;
    margin: 0 0 6px;
}
.tl-login-modal__opt { font-weight: 500; opacity: 0.7; }
.tl-login-modal__form input[type="text"],
.tl-login-modal__form input[type="password"],
.tl-login-modal__form input[type="email"],
.tl-login-modal__form input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 12px 13px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0b0e11;
    color: #fff;
    font: inherit;
    font-size: 0.92rem;
}
.tl-login-modal__form input:focus {
    outline: none;
    border-color: rgba(30, 86, 245, 0.65);
}
.tl-login-modal__pass-wrap { position: relative; }
.tl-login-modal__pass-wrap input { padding-inline-end: 44px; }
.tl-login-modal__eye {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    transform: translateY(calc(-50% - 6px));
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9aa3b2;
    cursor: pointer;
}
.tl-login-modal__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 12px;
    font-size: 0.8rem;
}
.tl-login-modal__remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c4c4cc;
    cursor: pointer;
}
.tl-login-modal__row a { color: #4f7cff; text-decoration: none; font-weight: 650; }
.tl-login-modal__error {
    min-height: 1.2em;
    margin: 0 0 10px;
    font-size: 0.82rem;
    color: #f87171;
}
.tl-login-modal__hint {
    margin: 0 0 12px;
    font-size: 0.84rem;
    color: #9aa3b2;
    line-height: 1.5;
}

.tl-login-modal__submit {
    position: relative;
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    background: #1e56f5;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tl-login-modal__submit:disabled { cursor: wait; opacity: 0.85; }
.tl-login-modal__submit-busy {
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: tlLoginSpin 0.7s linear infinite;
}
.tl-login-modal__submit.is-busy .tl-login-modal__submit-label { opacity: 0; }
.tl-login-modal__submit.is-busy .tl-login-modal__submit-busy {
    display: block;
    position: absolute;
}
@keyframes tlLoginSpin {
    to { transform: rotate(360deg); }
}

.tl-login-modal__or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
}
.tl-login-modal__or::before,
.tl-login-modal__or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.tl-login-modal__google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0b0e11;
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
}
.tl-login-modal__google:hover { border-color: rgba(255, 255, 255, 0.22); }
.tl-login-modal__switch {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: #9aa3b2;
}
.tl-login-modal__switch button {
    appearance: none;
    border: 0;
    background: none;
    color: #4f7cff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    padding: 0;
}
.tl-login-modal__back {
    display: block;
    width: 100%;
    margin-top: 10px;
    border: 0;
    background: transparent;
    color: #9aa3b2;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    min-height: 36px;
}
body.tl-login-modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .tl-login-modal__panel,
    .tl-login-modal__submit-busy { animation: none !important; }
}
