/*
 * Brand lockup — shared by the customer site, admin panel, partner portal, auth pages and invoice.
 * Rendered only by resources/views/components/brand/logo.blade.php. Keep logo styling here and nowhere else.
 * Height drives the size; width follows the artwork's 495:150 aspect ratio.
 */

.ht-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: var(--ht-text, #0f172a);
    line-height: 1;
    text-decoration: none;
}

.ht-logo:hover,
.ht-logo:focus {
    color: var(--ht-text, #0f172a);
    text-decoration: none;
}

.ht-logo img {
    display: block;
    height: 46px;
    width: auto;
    max-width: none;
    aspect-ratio: 495 / 150;
}

/* Sizes: md = headers (default), lg = footer / auth panel / documents, sm = compact bands */
.ht-logo--lg img { height: 52px; }
.ht-logo--sm img { height: 34px; }

@media (max-width: 991.98px) {
    .ht-logo img { height: 42px; }
    .ht-logo--lg img { height: 48px; }
    .ht-logo--sm img { height: 32px; }
}

@media (max-width: 575.98px) {
    .ht-logo img { height: 38px; }
    .ht-logo--lg img { height: 44px; }
    .ht-logo--sm img { height: 30px; }
}

/* `hidden` must win, so the fallback only takes a display value once the image has failed */
.ht-logo__fallback:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ht-logo__mark {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ht-primary, #0776c7);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
}

.ht-logo__word {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.ht-logo__word strong {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ht-logo__word small {
    font-size: 11px;
    font-weight: 600;
    color: var(--ht-text-muted, #64748b);
    letter-spacing: 0.04em;
}

/* Reversed lockup on dark surfaces */
.ht-logo--light .ht-logo__word strong,
.ht-logo--light:hover {
    color: #fff;
}

.ht-logo--light .ht-logo__word small {
    color: rgba(255, 255, 255, 0.55);
}

.ht-logo--light .ht-logo__mark {
    background: #fff;
    color: var(--ht-primary, #0776c7);
}

@media print {
    .ht-logo--lg img { height: 52px; }
}
