/* ═══════════════════════════════════════════════════════
   TBM Auth — widget + modal styles
   ═══════════════════════════════════════════════════════ */

/* ── Auth widget (login button / greeting) ──────────────── */
.tbm-auth-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: flex-end;
    padding: 0 0 10px;
    direction: rtl;
}
.tbm-user-greeting {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}
.tbm-auth-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    text-decoration: underline;
}
.tbm-auth-link:hover { color: #374151; }
.tbm-auth-link-cta {
    color: #2563eb;
    font-weight: 600;
    font-size: 14px;
}
.tbm-auth-link-cta:hover { color: #1d4ed8; }

/* ── Modal overlay ──────────────────────────────────────── */
#tbm-auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
.tbm-auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .48);
    backdrop-filter: blur(2px);
}

/* ── Modal box ──────────────────────────────────────────── */
.tbm-auth-box {
    position: relative;
    background: #fff;
    border-radius: 18px;
    width: calc(100% - 32px);
    max-width: 400px;
    padding: 30px 28px 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
    direction: rtl;
    animation: tbmSlideUp .22s ease;
}
@keyframes tbmSlideUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Close button ───────────────────────────────────────── */
.tbm-auth-close {
    position: absolute;
    top: 14px;
    left: 16px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.tbm-auth-close:hover { color: #374151; background: #f3f4f6; }

/* ── Tabs row ───────────────────────────────────────────── */
.tbm-auth-tabs-row {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 22px;
}
.tbm-auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s;
}
.tbm-auth-tab.active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}

/* ── Social row ─────────────────────────────────────────── */
.tbm-social-row { margin-bottom: 4px; }

.tbm-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: 1.5px solid #dadce0;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, box-shadow .15s;
    box-sizing: border-box;
}
.tbm-btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.tbm-btn-disabled { opacity: .45; cursor: not-allowed !important; }
.tbm-hint {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin: 6px 0 0;
}
.tbm-hint a { color: #2563eb; text-decoration: none; }
.tbm-hint a:hover { text-decoration: underline; }

/* ── Divider ─────────────────────────────────────────────── */
.tbm-auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: #9ca3af;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.tbm-auth-divider::before,
.tbm-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ── Inputs ──────────────────────────────────────────────── */
.tbm-auth-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    margin-bottom: 10px;
    outline: none;
    transition: border-color .15s;
    background: #fff;
}
.tbm-auth-input:focus { border-color: #2563eb; }
.tbm-auth-input::placeholder { color: #9ca3af; }

/* ── Role cards ──────────────────────────────────────────── */
.tbm-roles {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.tbm-role-card {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.tbm-role-card:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.tbm-role-card input[type="radio"] { margin-top: 2px; flex-shrink: 0; accent-color: #2563eb; }
.tbm-role-card > span { display: flex; flex-direction: column; gap: 2px; }
.tbm-role-card strong { font-size: 14px; color: #111827; font-weight: 600; }
.tbm-role-card small  { font-size: 12px; color: #6b7280; }

/* ── Error ───────────────────────────────────────────────── */
.tbm-auth-error {
    color: #dc2626;
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 6px;
    text-align: center;
}

/* ── Submit button ───────────────────────────────────────── */
.tbm-auth-submit {
    display: block;
    width: 100%;
    padding: 11px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 14px;
}
.tbm-auth-submit:hover    { background: #1d4ed8; }
.tbm-auth-submit:disabled { background: #93c5fd; cursor: not-allowed; }

/* ── Footer link ─────────────────────────────────────────── */
.tbm-auth-foot {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}
.tbm-auth-foot a { color: #2563eb; text-decoration: none; }
.tbm-auth-foot a:hover { text-decoration: underline; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    .tbm-auth-box { padding: 24px 16px 18px; }
    .tbm-roles { flex-direction: column; }
}
