/* fdoi.css — Base styles for fdoi.us */

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('/fonts/JetBrainsMono/JetBrainsMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Reset & base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
    margin: 0;
    padding: 0;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
header {
    background: #1e293b;
    color: #f8fafc;
    padding: 0.75rem 1.5rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-brand:hover {
    text-decoration: none;
    color: #93c5fd;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #cbd5e1;
}

.nav-links a:hover {
    color: #f8fafc;
    text-decoration: none;
}

.nav-form {
    margin: 0;
}

.nav-button {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.nav-button:hover {
    color: #f8fafc;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 3rem;
}

/* Messages */
.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.message-success {
    background: #dcfce7;
    color: #166534;
}

.message-error {
    background: #fef2f2;
    color: #991b1b;
}

/* Gallery grid */
.gallery-header h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.clear-filter {
    font-size: 0.875rem;
    font-weight: normal;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

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

.gallery-item a img {
    width: 100%;
    aspect-ratio: 9/5;
    object-fit: cover;
    display: block;
}

.gallery-item-title {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.gallery-item-title a {
    color: #334155;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748b;
    padding: 3rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

.pagination a:hover {
    background: #f1f5f9;
    text-decoration: none;
}

.page-info {
    color: #64748b;
    font-size: 0.875rem;
}

/* Cover navigation (prev/next) */
.cover-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Gallery subtitle */
.gallery-subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

/* Cover detail */
.cover-detail h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.cover-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .cover-main {
        grid-template-columns: 1fr;
    }
}

.cover-image img {
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.cover-description {
    margin-bottom: 1rem;
    color: #475569;
}

.meta-item {
    margin: 0.5rem 0;
}

.meta-item dt {
    font-weight: 600;
    font-size: 0.8125rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-item dd {
    margin: 0;
}

/* Tags */
.cover-tags h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.tag-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tag-list li a {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 0.25rem;
    font-size: 0.8125rem;
}

.tag-list li a:hover {
    background: #dbeafe;
    text-decoration: none;
}

/* Tag cloud */
.tag-cloud-page h1 {
    margin-bottom: 1.5rem;
}

.tag-cloud {
    line-height: 2.5;
    text-align: center;
}

.tag-cloud-item {
    padding: 0.25rem 0.5rem;
    color: #2563eb;
}

.tag-cloud-item:hover {
    background: #eff6ff;
    border-radius: 0.25rem;
    text-decoration: none;
}

/* Cover actions */
.cover-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: #f9fafb;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* Inline forms (favorite toggle) */
.inline-form {
    display: inline;
    margin: 0;
}

.btn-favorite {
    border-color: #e2e8f0;
}

.btn-favorite.is-favorited {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.form-input,
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.form-textarea,
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.field-errors {
    color: #dc2626;
    font-size: 0.8125rem;
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
}

/* Additional images */
.additional-images {
    margin-top: 1rem;
}

.additional-images h3 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.additional-images img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
    margin-right: 0.5rem;
}

/* Locations table */
.locations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.locations-table th,
.locations-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.locations-table th {
    background: #f8fafc;
    font-weight: 600;
}

/* Login page */
.login-page {
    max-width: 400px;
    margin: 2rem auto;
}

.login-page h1 {
    text-align: center;
}

/* Cover images page */
.cover-images .image-group {
    margin-bottom: 2rem;
}

.cover-images .image-size {
    margin-bottom: 1rem;
}

.cover-images .image-size h3 {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

/* Date/location items */
.date-location-item {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.date-location-item .date {
    font-weight: 600;
    margin-right: 0.5rem;
}

.no-image {
    padding: 3rem;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    border-radius: 0.5rem;
    color: #64748b;
}

/* Artist grid */
.artist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.artist-card {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: box-shadow 0.2s;
}

.artist-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.artist-name {
    font-weight: 600;
    color: #1e293b;
}

.artist-count {
    font-size: 0.8125rem;
    color: #64748b;
}

.artist-bio {
    margin-bottom: 1rem;
    color: #475569;
}

.artist-dates {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

/* Browse grid (years, states) */
.browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.browse-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: box-shadow 0.2s;
    text-align: center;
}

.browse-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.browse-label {
    font-weight: 600;
    color: #1e293b;
}

.browse-count {
    font-size: 0.75rem;
    color: #64748b;
}

/* Related covers */
.related-covers {
    margin-top: 1.5rem;
}

.related-covers h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.related-item {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.related-item img {
    width: 100%;
    aspect-ratio: 9/5;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}

.related-item span {
    font-size: 0.6875rem;
    color: #475569;
    margin-top: 0.25rem;
    line-height: 1.3;
}

.related-item:hover {
    text-decoration: none;
}

.related-item:hover img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Month pills */
.month-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.month-pill {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 1rem;
    font-size: 0.8125rem;
}

.month-pill:hover {
    background: #dbeafe;
    text-decoration: none;
}

/* Search form */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.search-result-count {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.breadcrumbs a {
    color: #2563eb;
}

/* Footer links */
.footer-links {
    font-size: 0.8125rem;
}

.footer-links a {
    color: #64748b;
}

.footer-links a:hover {
    color: #2563eb;
}

/* Discovery sections (home page) */
.discovery-section {
    margin-bottom: 2rem;
}

.discovery-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.discovery-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Gallery coverage line */
.gallery-coverage {
    color: #94a3b8;
    font-size: 0.8125rem;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

/* Needs Attention section (staff only) */
.needs-attention-section {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.needs-attention-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: #92400e;
}

.needs-attention-list li {
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .site-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }
}
