/* FSU Australia Members Portal — shared stylesheet */

/* ── Accessibility utilities ────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  background: #4f46e5;
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 0 0 6px 0;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  min-height: 100vh;
}

/* ── Header / nav ───────────────────────────────────────────────────────── */
header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: .5rem 1.5rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  flex-wrap: wrap;
  gap: .5rem;
}
header .brand { font-weight: 700; font-size: 1rem; color: #1a1a2e; text-decoration: none; }
header nav { display: flex; gap: 1rem; align-items: center; font-size: .875rem; flex-wrap: wrap; }
header nav a { color: #4f46e5; text-decoration: none; }
header nav a:hover { text-decoration: underline; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  background: #f0f2f5;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .8rem;
  color: #555;
}
.badge-mod {
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  padding: .1rem .5rem;
  font-size: .75rem;
  font-weight: 600;
  margin-left: .4rem;
}

/* ── Main content area ──────────────────────────────────────────────────── */
main { max-width: 860px; margin: 2rem auto; padding: 0 1.25rem; }
h2 { font-size: 1.3rem; margin-bottom: 1.25rem; color: #1a1a2e; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  margin-bottom: 1rem;
  overflow: hidden;
}
.card > a { display: block; padding: 1rem 1.25rem; text-decoration: none; color: inherit; transition: background .15s; }
.card > a:hover { background: #f8f8ff; }

/* ── Category list ──────────────────────────────────────────────────────── */
.cat-label { font-weight: 600; font-size: 1rem; color: #1a1a2e; }
.cat-desc  { font-size: .875rem; color: #666; margin-top: .2rem; }
.cat-meta  { font-size: .8rem; color: #999; margin-top: .35rem; }

/* ── Posts ──────────────────────────────────────────────────────────────── */
.post { padding: 1rem 1.25rem; border-bottom: 1px solid #f0f2f5; }
.post:last-child { border-bottom: none; }
.post-meta {
  font-size: .8rem;
  color: #888;
  margin-bottom: .35rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.post-body { font-size: .95rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* ── Replies ────────────────────────────────────────────────────────────── */
.replies { margin-top: .75rem; padding-left: 1.25rem; border-left: 3px solid #e5e7eb; }
.reply { padding: .6rem 0; border-bottom: 1px solid #f5f5f5; }
.reply:last-child { border-bottom: none; }

.reply-form { margin-top: .75rem; }
.reply-form textarea {
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: .875rem;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  outline: none;
  background: #fafafa;
  transition: border-color .2s;
}
.reply-form textarea:focus { border-color: #4f46e5; background: #fff; }
.reply-form .btn { padding: .4rem .9rem; font-size: .85rem; margin-top: .4rem; }

/* ── Post form ──────────────────────────────────────────────────────────── */
.post-form {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.post-form h3 { font-size: 1rem; margin-bottom: .85rem; color: #1a1a2e; }

textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  outline: none;
  background: #fafafa;
  transition: border-color .2s;
}
textarea:focus { border-color: #4f46e5; background: #fff; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .6rem 1.25rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  margin-top: .75rem;
}
.btn:hover { background: #4338ca; }
.btn-approve { background: #16a34a; }
.btn-approve:hover { background: #15803d; }
.btn-reject { background: #dc2626; }
.btn-reject:hover { background: #b91c1c; }

/* ── Messages ───────────────────────────────────────────────────────────── */
.message {
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .9rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.message.error   { background: #fff0f0; border: 1px solid #ffcccc; color: #c0392b; }
.message.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.message.info    { background: #f0f7ff; border: 1px solid #b3d4ff; color: #1a5276; }

/* ── Misc ───────────────────────────────────────────────────────────────── */
.limit-note { font-size: .85rem; color: #888; margin-top: .5rem; }

.breadcrumb { font-size: .875rem; color: #888; margin-bottom: 1rem; }
.breadcrumb a { color: #4f46e5; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.empty { color: #999; font-size: .95rem; padding: 1.5rem 1.25rem; }

/* ── Info boxes ─────────────────────────────────────────────────────────── */
.info-box {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  padding: 1.25rem 1.5rem;
  font-size: .9rem;
  line-height: 1.65;
  color: #333;
  margin-bottom: 1rem;
}
.info-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: .65rem; color: #1a1a2e; }
.info-box ul, .info-box ol { padding-left: 1.25rem; margin: 0; }
.info-box li { margin-bottom: .4rem; }
.info-box a { color: #4f46e5; text-decoration: none; }
.info-box a:hover { text-decoration: underline; }

/* ── Sort bar ───────────────────────────────────────────────────────────── */
.sort-bar { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; font-size: .875rem; flex-wrap: wrap; }
.sort-bar span { color: #888; }
.sort-bar a { color: #4f46e5; text-decoration: none; padding: .25rem .6rem; border-radius: 6px; border: 1px solid #e5e7eb; }
.sort-bar a.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* ── Quality badge ──────────────────────────────────────────────────────── */
.quality-badge {
  font-size: .75rem;
  background: #fef9c3;
  color: #713f12;
  border-radius: 999px;
  padding: .1rem .5rem;
  font-weight: 600;
}

/* ── Proof code ─────────────────────────────────────────────────────────── */
.proof-code { background: #f0f2f5; padding: .15rem .4rem; border-radius: 4px; font-size: 1rem; letter-spacing: .05em; }
code { font-family: monospace; font-size: .9em; }

/* ── Moderation ─────────────────────────────────────────────────────────── */
.post-deleted { opacity: .7; }
.deleted-body { color: #999; font-style: italic; text-decoration: line-through; font-size: .95rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.deleted-placeholder { color: #aaa; font-style: italic; font-size: .9rem; }
.mod-note { font-size: .75rem; color: #b45309; margin-top: .35rem; }
.mod-controls { margin-top: .6rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .35rem; align-items: center; margin-top: 1.25rem; flex-wrap: wrap; }
.page-link { color: #4f46e5; text-decoration: none; padding: .3rem .65rem; border-radius: 6px; border: 1px solid #e5e7eb; font-size: .875rem; transition: background .15s; }
.page-link:hover { background: #f0f2f5; }
.page-link.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }

/* ── Login page ─────────────────────────────────────────────────────────── */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}
.logo { text-align: center; margin-bottom: 1.75rem; }
.logo h1 { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; }
.logo p { font-size: .9rem; color: #666; margin-top: .25rem; }
.field { margin-bottom: 1.25rem; }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .4rem; color: #333; }
input[type="email"], input[type="text"] {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color .2s;
  outline: none;
  background: #fafafa;
}
input:focus { border-color: #4f46e5; background: #fff; }
button[type="submit"] {
  width: 100%;
  padding: .75rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  margin-top: .25rem;
}
button[type="submit"]:hover { background: #4338ca; }
.back-link { text-align: center; margin-top: 1rem; font-size: .875rem; }
.back-link a { color: #4f46e5; text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

/* ── Portal Home ─────────────────────────────────────────────────────────── */
.welcome {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 2rem;
}
.welcome h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  border: none;
}
.welcome p {
  color: #555;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card-link {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
}
.card-link:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.card-link h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.card-link p {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
}

/* ── Resources Page ──────────────────────────────────────────────────────── */
.page-title {
  margin-bottom: 2rem;
}
.page-title h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  border: none;
}
.page-title p {
  color: #666;
  line-height: 1.6;
}

.resources-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.resource-item {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.resource-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.resource-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.resource-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.resource-content p {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
}
