/* ═══════════════════════════════════════════════════════════
   Site Logo Component
   Public site logo with initials fallback, header/footer/auth variants
   ═══════════════════════════════════════════════════════════ */

/* ── Base layout ── */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    text-decoration: none;
}

.site-logo:is(a) {
    transition: opacity 0.15s ease;
}
.site-logo:is(a):hover {
    opacity: 0.85;
}

/* ── Logo image ── */
.site-logo-img {
    display: block;
    object-fit: contain;
}

/* ── Initials fallback ── */
.site-logo-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #fff;
    background: var(--primary, #6366f1);
}

/* ── Optional name ── */
.site-logo-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

/* ═══════════════════════════════════════════════════════════
   Variant: header (site navigation, 40px tall typical)
   ═══════════════════════════════════════════════════════════ */
.site-logo--header {
    max-height: 40px;
}
.site-logo--header .site-logo-img {
    max-height: 40px;
    max-width: 200px;
}
.site-logo--header .site-logo-initials {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 16px;
}
.site-logo--header .site-logo-name {
    font-size: 1.125rem;
    max-width: 200px;
}

/* ═══════════════════════════════════════════════════════════
   Variant: footer (max 64px tall, smaller text)
   ═══════════════════════════════════════════════════════════ */
.site-logo--footer {
    max-height: 48px;
}
.site-logo--footer .site-logo-img {
    max-height: 48px;
    max-width: 150px;
}
.site-logo--footer .site-logo-initials {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 18px;
}
.site-logo--footer .site-logo-name {
    font-size: 0.9375rem;
    max-width: 150px;
}

/* ═══════════════════════════════════════════════════════════
   Variant: auth (login/register pages, centered, larger)
   ═══════════════════════════════════════════════════════════ */
.site-logo--auth {
    max-height: 64px;
}
.site-logo--auth .site-logo-img {
    max-height: 64px;
    max-width: 280px;
}
.site-logo--auth .site-logo-initials {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    font-size: 24px;
}
.site-logo--auth .site-logo-name {
    font-size: 1.5rem;
    max-width: 280px;
}

/* ═══════════════════════════════════════════════════════════
   Variant: surface (light backgrounds, similar to header)
   ═══════════════════════════════════════════════════════════ */
.site-logo--surface {
    max-height: 40px;
}
.site-logo--surface .site-logo-img {
    max-height: 40px;
    max-width: 200px;
}
.site-logo--surface .site-logo-initials {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 16px;
}
.site-logo--surface .site-logo-name {
    font-size: 1.125rem;
    max-width: 200px;
}

/* ═══════════════════════════════════════════════════════════
   Theme: light (default for surface variant)
   ═══════════════════════════════════════════════════════════ */
.site-logo--light .site-logo-name {
    color: var(--text-primary, #111827);
}

/* ═══════════════════════════════════════════════════════════
   Theme: dark (default for header/auth/footer on dark backgrounds)
   ═══════════════════════════════════════════════════════════ */
.site-logo--dark .site-logo-name {
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   Dark mode adjustments
   ═══════════════════════════════════════════════════════════ */
[data-mode="dark"] .site-logo--light .site-logo-name {
    color: var(--text-primary, #f9fafb);
}
