/* Member parts: account menu (top bar), "ประกาศผู้เล่น" board, the announce window. */

/* account menu */
.topbar-right { display: flex; align-items: center; gap: 12px; }
.account { position: relative; }
.account-btn {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; list-style: none; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--fg);
}
.account-btn::-webkit-details-marker { display: none; }
.account-label { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 250px;
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: #15171c; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.account-menu p { margin: 0; }
.account-menu a.btn-outline { display: flex; align-items: center; justify-content: center; color: var(--fg); text-decoration: none; }
.login-buttons { display: flex; flex-direction: column; gap: 8px; }
.btn-login { height: 44px; border: 0; border-radius: 8px; font-weight: 600; }
.btn-google { background: #fff; color: #1f1f1f; }
.btn-discord { background: #5865f2; color: #fff; }

/* board */
/* no box: the cards line up with the item grid below (cards: announce-card.css) */
.announce-board { margin: 0 0 24px; padding: 0 0 20px; border-bottom: 1px solid var(--card-line); }
.ann-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
/* heading: megaphone + text in a dark game-style box */
.ann-title {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; padding: 5px 14px 5px 9px;
  font-size: 16px; color: #fff;
  background: linear-gradient(180deg, #2d3547, #1e2431);
  border: 1px solid #3b4559; border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}
.ann-title-icon { width: 25px; height: 28px; flex: none; }
.btn-small { height: 36px; padding: 0 14px; font-size: 14px; }
.ann-note { margin: 0 0 12px; color: var(--gold); font-size: 14px; }
.ann-empty { margin: 0; font-size: 14px; }
.ann-kind {
  flex: none; height: 24px; padding: 0 10px; display: inline-flex; align-items: center;
  border-radius: 999px; font-size: 12px; font-weight: 700;
}
.kind-sell { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.kind-buy { background: rgba(239, 68, 68, 0.16); color: #f87171; }
/* text colour of a post: same as its ขาย / รับซื้อ badge */
.ann-sell { --kind: #4ade80; }
.ann-buy { --kind: #f87171; }
/* admin page rows (admin/announcements.js + annItem.js): text, or picture + "+7 Lance [1]" ×2 price + details */
.ann-body { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--kind, var(--fg)); }
.ann-icon {
  flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: #15171c; border: 1px solid var(--card-line); border-radius: 8px;
}
.ann-icon img, .ann-icon svg { width: 32px; height: 32px; image-rendering: pixelated; }
.ann-item { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; font-size: 17px; font-weight: 600; line-height: 1.5; }
.ann-item-name { color: var(--kind, var(--fg)); text-decoration: none; overflow-wrap: anywhere; }
.ann-item-name:hover { text-decoration: underline; }
.ann-amount { color: var(--muted); font-size: 14px; font-weight: 500; }
.ann-price { color: var(--gold); }
.ann-cards { margin: 0; color: var(--card-slot); font-size: 13px; overflow-wrap: anywhere; }   /* cards in the item (013) */
.ann-details { margin: 2px 0 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.ann-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; font-size: 13px; }
.ann-act { padding: 2px 6px; background: none; border: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.ann-act:hover { color: var(--gold); }
.ann-author { color: #7fb3e8; font-weight: 600; }   /* member name -> their Facebook */
.ann-author:hover { color: var(--gold); }
.badge-verified { display: inline-flex; margin-left: 4px; vertical-align: -2px; }
.badge-admin {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px; vertical-align: 1px;
  background: var(--gold); color: var(--bg); font-size: 11px; font-weight: 700;
}

/* announce window */
.modal {
  width: min(520px, calc(100vw - 32px)); padding: 0;
  background: #15171c; color: var(--fg); border: 1px solid var(--line); border-radius: 14px;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.72); }
.modal > p, .modal > .login-buttons { margin: 0 20px 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 0 20px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head .popup-close { position: static; float: none; margin: 0; }
.modal-form { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; }
.kind-row { display: flex; gap: 8px; }
.kind-btn { flex: 1; height: 40px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.kind-btn.is-active.kind-sell { border-color: #4ade80; color: #4ade80; }
.kind-btn.is-active.kind-buy { border-color: #f87171; color: #f87171; }
.modal-text { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.modal-row { display: flex; justify-content: space-between; gap: 8px; margin-top: -6px; }
.modal-label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.form-error { margin: 0; min-height: 1em; color: var(--warn); font-size: 14px; }

@media (max-width: 480px) {
  .account-label { display: none; }   /* icon only: room for the logo + server picker */
  .account-btn { padding: 0 10px; }
}
