/* Lippert Tech Hub — cartridge host, frame and administration styles (design docs 06, 12). */

/* The host fills the full-bleed body that MainLayout gives /apps/{slug} routes (.lh-body-cartridge). */
.lh-cartridge-host {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.lh-cartridge-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

/* layout: fill — the frame takes every remaining pixel and the cartridge scrolls internally. */
.lh-cartridge-frame {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    background: var(--rz-base-background-color, #ffffff);
}

/* layout: auto — height comes from ui.resize; the Hub page scrolls. */
.lh-cartridge-frame--auto {
    flex: 0 0 auto;
}

.lh-cartridge-busy {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 2;
    height: 3px;
}

/* Screen-reader-only text: announces "{Name} is working" without showing it. */
.lh-cartridge-announce {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lh-cartridge-skeleton,
.lh-cartridge-panel--overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: var(--rz-base-background-color, #ffffff);
}

.lh-cartridge-skeleton {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #2C2C2C;
}

.lh-cartridge-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 40rem;
    margin: 4rem auto;
    padding: 1.5rem;
    text-align: center;
    color: #2C2C2C;
}

.lh-cartridge-panel--overlay {
    max-width: none;
    margin: 0;
}

.lh-cartridge-panel-icon {
    font-size: 2.5rem;
    color: #97999B;
}

.lh-cartridge-panel-title {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
}

.lh-cartridge-panel-meta {
    color: #6b6d70;
    font-size: 0.8125rem;
}

/* Sign-in banner above the frame (interaction_required). */
.lh-cartridge-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #fff4f1;
    border-bottom: 2px solid #DC3513;
    color: #2C2C2C;
}

.lh-cartridge-banner-text {
    flex: 1 1 auto;
}

/* Administration. */
.lh-cartridge-table {
    width: 100%;
    border-collapse: collapse;
}

.lh-cartridge-table th,
.lh-cartridge-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e3e4e5;
    text-align: left;
    vertical-align: top;
}

.lh-cartridge-table thead th {
    font-weight: 600;
    border-bottom: 2px solid #97999B;
}

.lh-cartridge-token-routing {
    background: #fff8e6;
}

.lh-cartridge-section {
    padding: 1rem;
    border: 1px solid #e3e4e5;
    border-radius: 6px;
}

.lh-cartridge-section-title {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.lh-cartridge-fieldset {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    border: 0;
    padding: 0;
}

.lh-cartridge-flag {
    color: #8a2a0f;
}

.lh-cartridge-findings {
    color: #8a2a0f;
}

.lh-cartridge-checks {
    margin: 0.5rem 0;
}

.lh-cartridge-registrant {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1rem;
    margin: 0.5rem 0 0.75rem;
}

.lh-cartridge-registrant dd {
    margin: 0;
}

.lh-cartridge-bind-form {
    display: grid;
    grid-template-columns: max-content minmax(16rem, 28rem);
    gap: 0.5rem 1rem;
    align-items: center;
    margin: 0.5rem 0 1rem;
}

.lh-cartridge-bind-form .rz-button {
    grid-column: 2;
    justify-self: start;
}

.lh-cartridge-events {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-left: 1.25rem;
}

.lh-cartridge-event-data {
    margin: 0.25rem 0 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.8125rem;
    background: #f6f6f7;
    padding: 0.5rem;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .lh-cartridge-skeleton * {
        animation: none !important;
    }
}
