/* NZB-Automator custom styles */

.stat-card {
    transition: transform 0.15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
}

.publication-cover {
    width: 48px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bs-tertiary-bg);
}

.publication-cover-placeholder {
    width: 48px;
    height: 64px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.875rem;
    background: var(--bs-secondary-bg);
}

.category-badge {
    color: white;
    padding: 0.2em 0.6em;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.4em;
}
.status-dot.active { background: #16a34a; }
.status-dot.paused { background: #6b7280; }
.status-dot.warning { background: #ea580c; }
.status-dot.error { background: #dc2626; }

.log-stream {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.825rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.log-line {
    padding: 0.15rem 0;
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.log-level {
    flex-shrink: 0;
    width: 70px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}
.log-level.DEBUG { background: #4b5563; color: white; }
.log-level.INFO { background: #2563eb; color: white; }
.log-level.WARNING { background: #ea580c; color: white; }
.log-level.ERROR { background: #dc2626; color: white; }

.log-ts {
    flex-shrink: 0;
    color: var(--bs-secondary-color);
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-row .frequency-select {
    max-width: 130px;
}

.spinner-tiny {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline-block;
}
.htmx-request.htmx-indicator {
    display: inline-block;
}

[data-bs-theme="light"] .log-stream {
    background: #f8f9fa;
}
