/* Donation modal — adapted from Mangosteen */

.site-header {
  justify-content: space-between;
}

.coffee-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #6f4e37 0%, #8b5a2b 100%);
  border: 1px solid rgba(139, 90, 43, 0.6);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: 0 2px 8px rgba(111, 78, 55, 0.3);
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #fff;
  line-height: 1;
}

.coffee-btn:hover {
  background: linear-gradient(135deg, #8b5a2b 0%, #a0522d 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(111, 78, 55, 0.4);
}

.coffee-text {
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.coffee-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.coffee-modal[hidden] {
  display: none;
}

.coffee-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.coffee-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--modal-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: coffeeModalIn 0.3s var(--ease);
}

.coffee-modal--donation .coffee-modal__panel {
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

@keyframes coffeeModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.coffee-modal__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
}

.coffee-modal__body {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex: 1;
  min-height: 0;
}

.coffee-modal__left {
  flex: 0 0 auto;
  width: 320px;
}

.coffee-modal__right {
  flex: 1;
  min-width: 0;
}

.coffee-modal__text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.coffee-modal__text strong {
  color: var(--accent);
  font-weight: 500;
}

.coffee-modal__qrcodes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.coffee-modal__qrcode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.coffee-modal__qrcode-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: #fff;
  padding: 6px;
}

.coffee-modal__qrcode-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.donation-board {
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.donation-board__header {
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.donation-board__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 280px;
}

.donation-board__scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 98, 0.38) transparent;
}

.donation-board__scroll::-webkit-scrollbar { width: 4px; }
.donation-board__scroll::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 98, 0.28);
  border-radius: 4px;
}

.donation-board__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
  table-layout: fixed;
}

.donation-board__table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--modal-bg);
}

.donation-board__table th {
  padding: 6px 4px;
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
}

.donation-board__table th:nth-child(1) { width: 34%; }
.donation-board__table th:nth-child(2) { width: 14%; }
.donation-board__table th:nth-child(3) { width: 10%; }
.donation-board__table th:nth-child(4) { width: 28%; }
.donation-board__table th:nth-child(5) { width: 14%; }

.donation-board__table td {
  padding: 5px 4px;
  color: var(--text-muted);
}

.donation-board__table td:nth-child(1) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.donation-board__table td:nth-child(4) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donation-board__table tbody tr:hover {
  background: var(--donation-row-hover);
}

.donation-board__table td:nth-child(3) {
  color: var(--accent);
}

.donation-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem;
}

.coffee-modal__footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.coffee-modal__notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.coffee-modal__btn {
  display: block;
  width: 100%;
  padding: 11px 24px;
  background: linear-gradient(135deg, #c9a962 0%, #a88b45 100%);
  color: #111;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.coffee-modal__btn:hover { opacity: 0.9; }

@media (max-width: 768px) {
  .coffee-modal__body { flex-direction: column; }
  .coffee-modal__left { width: 100%; }
  .donation-board__scroll { max-height: 200px; }
}
