/* TechTools Shared Account Widget — drop-in navbar account UI.
   Renders a badge + logout when signed in, or a "Sign In" button when not.
   Designed to coexist with the dark theme used across all tools. */

.ttaw {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    line-height: 1;
    vertical-align: middle;
}

.ttaw,
.ttaw * {
    box-sizing: border-box;
}

.ttaw-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    cursor: default;
    min-height: 36px;
    max-width: 200px;
}
.ttaw-badge i { color: #6366f1; font-size: 0.95rem; }
.ttaw-badge .ttaw-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.ttaw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    min-height: 36px;
    min-width: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ttaw-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}
.ttaw-btn.ttaw-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
    font-weight: 500;
}
.ttaw-btn.ttaw-btn-primary:hover {
    filter: brightness(1.1);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.ttaw-btn i { font-size: 0.9rem; }
.ttaw-btn .ttaw-btn-label { display: inline; }

/* When the widget is fixed in a tool that has no header, lift it above content */
.ttaw-floating {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 999;
    padding: 0.4rem 0.5rem;
    background: rgba(20, 20, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    color: #fff;
}

/* Mobile: collapse labels to icons but keep buttons tap-friendly */
@media (max-width: 600px) {
    .ttaw { font-size: 0.8rem; gap: 0.4rem; }
    .ttaw-badge { padding: 0.35rem 0.55rem; max-width: 120px; }
    .ttaw-btn { padding: 0.4rem 0.6rem; min-width: 40px; }
    .ttaw-btn .ttaw-btn-label { display: none; }
    .ttaw-floating { top: 0.5rem; right: 0.5rem; padding: 0.3rem 0.4rem; }
}

@media (max-width: 380px) {
    .ttaw-badge .ttaw-name { max-width: 70px; }
}
