/*
 * /books/shell.css — customer-side default styles for the mirror shell.
 *
 * Brick 1 minimum-viable defaults so the mirror looks presentable at first
 * deploy. Brick 4 turns this file into a customer-editable surface — you can
 * replace it entirely or tweak any rule below from the customer admin.
 *
 * Targets the class names emitted by johndelavera's hub.php fragment:
 *   .book-grid       outer wrapper
 *   .book-card       each book
 *   .cover           background-image-based cover
 *   .cover-empty     fallback when no cover image
 *   .cover-empty-title
 *   .info            text block under cover
 *   .title           book title
 *   .genre           book genre
 *   .badge           status pill (with .badge-live / .badge-soon / .badge-hidden)
 *
 * Class names are part of the public mirror contract (see STATUS doc §4 item
 * about Level-2 semantic CSS) — they will not change without notice.
 */

:root {
    --bg:        #faf8f4;
    --fg:        #1a1a1a;
    --muted:    #666;
    --line:     #e5e0d8;
    --accent:   #2a7a30;
    --card-bg:  #fff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
    --radius:    8px;
    --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.mirror-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* Book grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.75rem;
}

.book-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.book-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}
.book-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cover {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    background-size: cover;
    background-position: center;
    background-color: #ddd5cc;
}
.cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #d4c9b8 0%, #b8a989 100%);
    color: #fff;
    text-align: center;
}
.cover-empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.info {
    padding: 1rem 1.1rem 1.2rem;
}
.title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.35rem;
}
.genre {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}
.badge-live    { background: #e3f3e4; color: #1f5d24; }
.badge-soon    { background: #fff3d6; color: #7a5a00; }
.badge-hidden  { background: #eee;    color: #777;    }

/* Empty-state when an author has no public books yet */
.empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--muted);
}

@media (max-width: 480px) {
    .book-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .mirror-content { padding: 1.25rem 1rem 3rem; }
}
