/* ════════════════════════════════════════════════
   AnyAI Auth Widget — auth_widget.css
   Drop-in auth bar for all tool pages
   ════════════════════════════════════════════════ */

.anyai-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Login Button ── */
.anyai-auth__login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #e5e5ea;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    font-family: inherit;
    white-space: nowrap;
}
.anyai-auth__login-btn:hover {
    box-shadow: 0 3px 12px rgba(108,92,231,.35);
    transform: translateY(-1px);
}

/* ── AP Badge ── */
.anyai-auth__badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(108,92,231,.25);
    white-space: nowrap;
}
.anyai-auth__badge-icon { font-size: 13px; }

/* ── Credits Badge ── */
.anyai-auth__credits {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    background: rgba(0,184,148,.12);
    color: #00b894;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ── User Menu ── */
.anyai-auth__user {
    position: relative;
}
.anyai-auth__user-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #e5e5ea;
    background: #fafafa;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #1d1d1f;
    font-family: inherit;
    transition: all .2s;
}
.anyai-auth__user-btn:hover { background: #f0f0f2; }

.anyai-auth__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    z-index: 1000;
    overflow: hidden;
}
.anyai-auth__dropdown.show { display: block; }
.anyai-auth__dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    font-size: 13px;
    color: #1d1d1f;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    text-align: left;
}
.anyai-auth__dropdown-item:hover { background: rgba(108,92,231,.06); }
.anyai-auth__dropdown-item--danger { color: #e17055; }
.anyai-auth__dropdown-item--topup {
    color: #6c5ce7;
    font-weight: 600;
}
.anyai-auth__divider {
    height: 1px;
    background: rgba(0,0,0,.06);
    margin: 2px 0;
}

/* ── Login Modal ── */
.anyai-auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.anyai-auth-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
    position: relative;
    animation: aaw-modalIn .3s ease;
}
@keyframes aaw-modalIn {
    from { opacity: 0; transform: scale(.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.anyai-auth-modal__close {
    position: absolute;
    top: 12px; right: 12px;
    width: 28px; height: 28px;
    border: none; background: none;
    font-size: 20px; color: #aeaeb2;
    cursor: pointer;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.anyai-auth-modal__close:hover { background: #f5f5f7; color: #1d1d1f; }
.anyai-auth-modal__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}
.anyai-auth-modal__desc {
    font-size: 13px;
    color: #6e6e73;
    margin-bottom: 20px;
}
.anyai-auth-modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    border: 1px solid #e5e5ea;
    margin-bottom: 10px;
    font-family: inherit;
}
.anyai-auth-modal__btn--google {
    background: #fff;
    color: #333;
}
.anyai-auth-modal__btn--google:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.anyai-auth-modal__btn--wallet {
    background: linear-gradient(135deg, #f6851b, #e2761b);
    color: #fff;
    border: none;
}
.anyai-auth-modal__btn--wallet:hover {
    box-shadow: 0 4px 15px rgba(226,118,27,.35);
    transform: translateY(-1px);
}

/* ── Toast ── */
.anyai-toast {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    animation: aaw-toastIn .3s ease, aaw-toastOut .3s ease 2.7s forwards;
    font-family: 'Inter', -apple-system, sans-serif;
}
.anyai-toast--success { background: #00b894; }
.anyai-toast--error { background: #e17055; }
.anyai-toast--info { background: #6c5ce7; }
@keyframes aaw-toastIn { from { opacity:0; transform:translateX(30px); } }
@keyframes aaw-toastOut { to { opacity:0; transform:translateX(30px); } }

/* ── Responsive ── */
@media (max-width: 480px) {
    .anyai-auth { gap: 4px; }
    .anyai-auth__badge, .anyai-auth__credits { font-size: 11px; padding: 3px 8px; }
    .anyai-auth__login-btn { font-size: 11px; padding: 5px 10px; }
}
