/* Journalite app-specific styles */

/* Site nav */
.site-nav > div {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.site-nav .brand {
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
    margin-right: auto;
}

.site-nav a {
    text-decoration: none;
}


.search-toggle {
    font-style: normal;
    cursor: pointer;
}

/* Search bar — hidden by default, slides open */
.search-bar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
}

.search-bar.open {
    max-height: 5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.search-bar form {
    margin: 0;
}

/* Site header */
.site-header {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.site-header h1 {
    margin-bottom: 0;
}

.page-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.page-links a {
    text-decoration: none;
}


.page-links .new-page {
    font-size: 0.85rem;
}


/* Draft/Private labels */
.label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15em 0.5em;
    border-radius: var(--box-radius, 4px);
    vertical-align: middle;
}

.label.draft {
    background: var(--warning, #e6a700);
    color: #fff;
}

.label.private {
    background: var(--secondary, #666);
    color: var(--bg, #fff);
}

/* Tag cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag-cloud a {
    text-decoration: none;
    white-space: nowrap;
}

.tag-cloud .tag1 { font-size: 0.8rem; }
.tag-cloud .tag2 { font-size: 0.95rem; }
.tag-cloud .tag3 { font-size: 1.1rem; }
.tag-cloud .tag4 { font-size: 1.3rem; font-weight: 600; }

/* Post list */
.post-list article {
  margin: 1rem 0;
  display: flex;
  flex-wrap: nowrap;
}

.post-list article time {
  min-width: 6rem;
  margin: 0.25rem 0 0 0;
}
.post-list article .post-item {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  align-items: baseline;
}
article .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  align-items: baseline;
}


.post-list article h3 {
    margin: 0;
}

time {
  color: var(--muted, #888);
}
.post-list article time {
  font-size: 0.9rem;
}

/* Post tags inline */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.post-tags a {
    text-decoration: none;
    font-size: 0.9rem;
}

/* Previous/Next navigation */
.previous-next {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #ddd);
}

/* Admin controls */
.admin-controls {
}

.admin-controls a {
    margin-right: 1rem;
}

/* Inline delete forms */
.inline-form {
    display: inline;
}

/* Error/danger button */
button.error {
    background: var(--error, #c0392b);
    color: #fff;
}

button.error:hover {
    background: color-mix(in srgb, var(--error, #c0392b) 85%, black);
}

/* Post content */
.post-content {
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.post-content > h1:first-child {
    margin-top: 1rem;
}
/* Post content images */
.post-content img {
    max-width: 100%;
    height: auto;
}

/* Responsive embeds (YouTube, Vimeo, etc.) */
.embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    margin: 1.5rem 0;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Footer */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted, #888);
    border-top: 1px solid var(--border, #ddd);
}

.footer-link {
    color: var(--muted, #888);
    text-decoration: none;
}


/* Publish dashboard */
.publish-status {
    padding: 0.75rem 1rem;
    border-radius: var(--box-radius, 4px);
    background: var(--bg1, #f0f0f0);
    margin: 1rem 0;
}

/* Media table thumbnail column */
.media-actions {
    white-space: nowrap;
}

/* Form actions (Save / Finished buttons) */
.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

#save-status {
    font-size: 0.85rem;
    color: var(--muted, #888);
}

/* Editor metadata row (date, tags, options — inline above editor) */
.editor-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.editor-meta-field {
    flex: 1;
    min-width: 8rem;
}

.editor-meta-title {
    flex: 3;
}

.editor-meta-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted, #888);
    margin-bottom: 0.2rem;
}

.editor-meta-field input {
    width: 100%;
    margin-bottom: 0;
}

.editor-meta-options {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-bottom: 0.4rem;
}

.editor-meta-options label {
    white-space: nowrap;
    font-size: 0.9rem;
}


/* Version diff display */
.version-content {
    background: var(--bg1, #f0f0f0);
    padding: 1.5rem;
    border-radius: var(--box-radius, 4px);
    margin: 1rem 0;
}

nav.year-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .5rem 1rem;
  line-height: 1;
  margin-bottom: 2rem;
}