/* css/bulletin.css — Bulletin board / announcements (index page) */

/* --- Two-column layout (bulletin + Bluesky) --- */
.updates-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.updates-col {
  flex: 1;
  min-width: 0;
}

.updates-col--bulletin {
  display: flex;
  flex-direction: column;
}

.updates-col--bulletin .bulletin-pager {
  margin-top: auto;
}

.updates-col--bsky {
  border-left: 2px dashed color-mix(in srgb, var(--ink) 20%, transparent);
  padding-left: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 720px) {
  .updates-row {
    flex-direction: column;
    gap: 1rem;
  }
  .updates-col {
    width: 100%;
  }
  .updates-col--bsky {
    border-left: none;
    padding-left: 0;
    margin-top: 0;
    border-top: 2px dashed color-mix(in srgb, var(--ink) 20%, transparent);
    padding-top: 1rem;
  }
}

/* --- Bluesky feed --- */
#bsky-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bsky-post {
  margin: 0.4rem 0;
}

.bsky-post-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.bsky-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-circle);
  border: 2px solid var(--ink);
  object-fit: cover;
  flex-shrink: 0;
}

.bsky-author {
  font-family: var(--ui-font);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.bsky-author:hover {
  color: var(--accent);
}

.bsky-repost-label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--ui-font);
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.35;
  color: var(--ink);
}

.bsky-repost-label .icon {
  width: 12px;
  height: 12px;
}

.bsky-time {
  font-family: var(--ui-font);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.5;
  color: var(--ink);
  text-decoration: none;
  margin-left: auto;
}

.bsky-time:hover {
  opacity: 0.8;
}

.bsky-post-body {
  font-size: 0.95rem;
  line-height: 1.55;
  word-break: break-word;
}

.bsky-post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Embedded images */
.bsky-images {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.bsky-images--1 { grid-template-columns: 1fr; }
.bsky-images--2 { grid-template-columns: 1fr 1fr; }
.bsky-images--3 { grid-template-columns: 1fr 1fr; }
.bsky-images--4 { grid-template-columns: 1fr 1fr; }

.bsky-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 120px;
  cursor: var(--cursor-pointer);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  transition: opacity var(--transition-fast);
}

.bsky-img:hover {
  opacity: 0.8;
}

/* External link card */
.bsky-link-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 2px solid color-mix(in srgb, var(--ink) 15%, transparent);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--transition-fast);
}

.bsky-link-card:hover {
  border-color: var(--accent);
}

.bsky-link-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.bsky-link-title {
  font-family: var(--ui-font);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Post stats */
.bsky-post-stats {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-family: var(--ui-font);
  font-size: 0.8rem;
  opacity: 0.45;
}

.bsky-post-stats span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.bsky-post-stats .icon {
  width: 13px;
  height: 13px;
}

/* Footer link */
.bsky-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px dashed color-mix(in srgb, var(--ink) 15%, transparent);
  text-align: center;
}

.bsky-view-profile {
  font-family: var(--ui-font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.bsky-view-profile:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Announcement entries (flat — matches old Updates look) --- */
#bulletin-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bulletin-card {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin: 0.4rem 0;
}

.bulletin-card:hover {
  transform: none;
  box-shadow: none;
}

.bulletin-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.bulletin-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-circle);
  border: 2px solid var(--ink);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: none;
}

.bulletin-poster {
  font-family: var(--ui-font);
  font-size: 0.95rem;
  font-weight: 700;
}

.bulletin-time {
  font-family: var(--ui-font);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.5;
}

.bulletin-edited {
  font-size: 0.72rem;
  opacity: 0.4;
  font-style: italic;
  font-family: var(--ui-font);
}

.bulletin-body {
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-line;
  word-break: break-word;
}

.bulletin-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bulletin-body a:hover {
  opacity: 0.8;
}

.bulletin-empty {
  text-align: center;
  opacity: 0.5;
  font-style: italic;
  padding: 1rem 0;
  margin: 0;
}

/* --- Admin action buttons (edit/delete) --- */
.bulletin-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.bulletin-action-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: var(--cursor-pointer);
  transition: background var(--transition-fast), border-color var(--transition-fast),
    transform var(--transition-fast);
  padding: 0;
}

.bulletin-action-btn:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-color: color-mix(in srgb, var(--ink) 20%, transparent);
  transform: scale(1.1);
}

.bulletin-delete-btn:hover {
  background: rgba(248, 52, 89, 0.12);
  border-color: rgba(248, 52, 89, 0.3);
}

/* --- Admin new post form --- */
.bulletin-new-form {
  background: none;
  border: none;
  border-bottom: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: 0;
  padding: 0 0 10px;
  margin-bottom: 10px;
  box-shadow: none;
}

.bulletin-new-form .bulletin-card-header {
  margin-bottom: 8px;
}

.bulletin-form-label {
  font-family: var(--ui-font);
  font-size: 0.9rem;
  opacity: 0.5;
}

.bulletin-textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-sm);
  font-family: var(--ui-font);
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  background: var(--offwhite);
  color: var(--ink);
  box-sizing: border-box;
  transition: border-color var(--transition-fast);
}

.bulletin-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.bulletin-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

.bulletin-char-count {
  font-family: var(--ui-font);
  font-size: 0.75rem;
  opacity: 0.4;
}

.bulletin-edit-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.bulletin-date-label {
  font-family: var(--ui-font);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
}

.bulletin-date-input {
  font-family: var(--ui-font);
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--offwhite);
  cursor: var(--cursor-pointer);
}

/* Inline edit form replaces the body */
.bulletin-edit-form {
  margin-top: -4px;
}

/* --- Pagination --- */
.bulletin-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px dashed color-mix(in srgb, var(--ink) 15%, transparent);
}

.bulletin-pager-btn {
  font-family: var(--ui-font);
  font-size: 0.82rem;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--offwhite);
  color: var(--ink);
  cursor: var(--cursor-pointer);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.bulletin-pager-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--ink);
}

.bulletin-pager-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.bulletin-pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

.bulletin-pager-info {
  font-family: var(--ui-font);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.6;
}
