/* PodRack custom styles */

:root {
    --pod-accent: #7c3aed;
    --pod-accent-light: #a78bfa;
    --pod-bg-card: #f8f9fa;
    --pod-border: #e2e8f0;
    --pod-text-muted: #64748b;
}

/* Nav */
nav {
    border-bottom: 1px solid var(--pod-border);
    padding-bottom: 0.5rem;
}

nav a {
    text-decoration: none;
}

/* Dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--pod-bg-card);
    border: 1px solid var(--pod-border);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pod-accent);
}

.stat-card .stat-label {
    color: var(--pod-text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Show grid */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.show-card {
    background: var(--pod-bg-card);
    border: 1px solid var(--pod-border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.show-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.show-card a {
    text-decoration: none;
    color: inherit;
}

.show-card-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #e2e8f0;
    display: block;
}

.show-card-cover-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--pod-accent-light), var(--pod-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
}

.show-card-body {
    padding: 1rem;
}

.show-card-body h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.show-card-body .meta {
    color: var(--pod-text-muted);
    font-size: 0.8rem;
}

.show-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.show-type-badge.mirrored { background: #dbeafe; color: #1e40af; }
.show-type-badge.custom { background: #dcfce7; color: #166534; }
.show-type-badge.mixed { background: #fef3c7; color: #92400e; }

/* Ad status badges */
.ad-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ad-badge.ad-dirty { background: #fef3c7; color: #92400e; }
.ad-badge.ad-cleaning { background: #dbeafe; color: #1e40af; }
.ad-badge.ad-clean { background: #dcfce7; color: #166534; }

/* Episode list */
.episode-list {
    list-style: none;
    padding: 0;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--pod-border);
}

.episode-item:last-child {
    border-bottom: none;
}

.episode-item .ep-number {
    color: var(--pod-text-muted);
    font-size: 0.8rem;
    min-width: 2rem;
    text-align: right;
}

.episode-item .ep-info {
    flex: 1;
}

.episode-item .ep-info h5 {
    margin: 0;
    font-size: 0.95rem;
}

.episode-item .ep-info .ep-meta {
    color: var(--pod-text-muted);
    font-size: 0.8rem;
}

.episode-item .ep-status {
    font-size: 0.8rem;
}

.status-complete { color: #16a34a; }
.status-downloading { color: #2563eb; }
.status-pending { color: var(--pod-text-muted); }
.status-failed { color: #dc2626; }

/* Feed URL display */
.feed-url-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--pod-bg-card);
    border: 1px solid var(--pod-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
}

.feed-url-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: monospace;
    font-size: 0.85rem;
    margin: 0;
    padding: 0;
}

.feed-url-box button {
    white-space: nowrap;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    margin: 0;
}

/* Show detail header */
.show-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.show-header img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.show-header-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pod-accent-light), var(--pod-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    font-weight: 700;
    flex-shrink: 0;
}

.show-header-info {
    flex: 1;
}

.show-header-info h1 {
    margin: 0 0 0.5rem;
}

.show-header-info .show-meta {
    color: var(--pod-text-muted);
    margin-bottom: 1rem;
}

/* Episode detail */
.episode-header {
    margin-bottom: 2rem;
}

.chapter-list {
    list-style: none;
    padding: 0;
}

.chapter-list li {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--pod-border);
}

.chapter-time {
    font-family: monospace;
    color: var(--pod-accent);
    min-width: 5rem;
}

/* Downloads */
.download-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--pod-border);
}

.download-item .progress-bar {
    flex: 1;
    height: 8px;
    background: var(--pod-border);
    border-radius: 4px;
    overflow: hidden;
}

.download-item .progress-bar .progress-fill {
    height: 100%;
    background: var(--pod-accent);
    border-radius: 4px;
    transition: width 0.3s;
}

/* Form sections */
.form-section {
    background: var(--pod-bg-card);
    border: 1px solid var(--pod-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    margin-top: 0;
}

/* Audio player */
.audio-player {
    width: 100%;
    margin: 1rem 0;
}

/* Actions bar */
.actions-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .show-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}

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

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