/* Route-local styles for /books/. */

/* Keep this lightweight and readable; the app runs as an offline-capable PWA shell. */
.hero h1 {
    margin: 0;
    max-width: 16ch;
    font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.notice {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-3);
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid var(--site-border);
}

.notice.warning {
    border-left: 4px solid var(--site-accent-strong);
}

.lede {
    max-width: 68ch;
    margin: 0;
    color: var(--site-text-muted);
    line-height: 1.7;
}

.stat-line {
    margin: 0.2rem 0;
    color: var(--site-text-muted);
}

.book-form {
    display: grid;
    gap: var(--size-4);
}

.form-grid {
    display: grid;
    gap: var(--size-4);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-text,
.empty-state {
    margin: 0;
    color: var(--site-text-muted);
    line-height: 1.7;
}

.toolbar {
    display: grid;
    gap: var(--size-4);
    grid-template-columns: 1fr 220px auto;
    align-items: end;
}

.toolbar-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.file-input-button {
    position: relative;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
}

.file-input-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.book-table {
    margin-top: var(--size-4);
    display: grid;
    gap: var(--size-3);
}

.book-card {
    display: grid;
    gap: var(--size-2);
    padding: var(--size-4);
    border: 1px solid var(--site-border);
    border-radius: var(--radius-3);
    background: white;
}

.book-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: var(--font-weight-6);
    background: var(--gray-2);
    color: var(--site-text-muted);
}

.badge.apple {
    background: #dbeafe;
    color: #1e40af;
}

.badge.kindle {
    background: #ffedd5;
    color: #9a3412;
}

.badge.other {
    background: #f0fdf4;
    color: #166534;
}

.book-title {
    margin: 0;
    font-size: 1.2rem;
}

.book-meta {
    margin: 0;
    color: var(--site-text-muted);
}

.location-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--size-2);
    align-items: center;
}

.location-row .field {
    font-size: 0.95rem;
    color: var(--site-text-muted);
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--size-2);
}

.d-none {
    display: none !important;
}

.pill {
    border: 1px solid var(--site-border);
    border-radius: var(--radius-round);
    padding: 0.36rem 0.75rem;
    background: white;
    font-size: 0.86rem;
    color: var(--site-text);
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        grid-template-columns: 1fr;
    }

    .toolbar-actions {
        justify-content: flex-start;
    }
}
