/* On-page log panel — Temple.Web production diagnostics */
.temple-log-fab {
    position: fixed;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 10050;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #1B6B4A 0%, #145A3D 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(15, 61, 42, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
}

.temple-log-fab--active {
    background: #145A3D;
}

.temple-log-fab__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #F5C518;
    color: #145A3D;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.temple-log-panel {
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 4rem;
    z-index: 10049;
    max-height: min(52vh, 420px);
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 20, 0.96);
    border: 1px solid rgba(245, 197, 24, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    color: #e8f5ee;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
}

.temple-log-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    background: rgba(27, 107, 74, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.temple-log-panel__head strong {
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: 0.8rem;
    color: #F5C518;
}

.temple-log-panel__actions {
    display: flex;
    gap: 0.35rem;
}

.temple-log-panel__actions .btn {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    line-height: 1.3;
}

.temple-log-panel__body {
    overflow: auto;
    padding: 0.45rem 0.5rem 0.6rem;
    -webkit-overflow-scrolling: touch;
}

.temple-log-panel__empty {
    margin: 0.5rem 0;
    opacity: 0.7;
    font-style: italic;
}

.temple-log-line {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0.35rem 0.5rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    word-break: break-word;
}

.temple-log-line__time {
    opacity: 0.65;
    white-space: nowrap;
}

.temple-log-line__cat {
    color: #a7f3d0;
    white-space: nowrap;
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.temple-log-line--warn .temple-log-line__msg { color: #fde68a; }
.temple-log-line--error .temple-log-line__msg { color: #fca5a5; }
.temple-log-line--debug .temple-log-line__msg { color: #93c5fd; opacity: 0.9; }

@media (min-width: 768px) {
    .temple-log-panel {
        left: auto;
        width: min(520px, calc(100vw - 2rem));
        right: 1rem;
    }
}
