/* affiliate.css — หน้าแนะนำเพื่อน (views/pages/affiliate.ejs) */

/* === layout === */
.aff-page { padding-bottom: 24px; }
.aff-page .page-head { margin-top: 0; }
.aff-head-note { font-size: 13px; color: rgba(255,255,255,.7); }
.aff-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.aff-top > * { min-width: 0; }
.aff-box-title { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 12px; }
.aff-ico { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.ta-r { text-align: right; }

/* === share box (QR + link) === */
.aff-share-body { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.aff-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.aff-page .qr-box { padding: 10px; border-radius: 14px; box-shadow: 0 0 0 2px var(--accent-1, #e9b033), 0 8px 24px rgba(0,0,0,.5); }
.aff-page .qr-box img { width: 168px; height: 168px; }
.aff-qr-hint { font-size: 12px; color: rgba(255,255,255,.65); }
.aff-share-link { width: 100%; min-width: 0; max-width: 100%; }
.aff-share-body { width: 100%; }
.aff-page .copy-field { padding: 6px 6px 6px 12px; background: rgba(0,0,0,.6); }
.aff-page .copy-field .txt { font-size: 14px; color: #fff; cursor: pointer; }
.aff-page .copy-field .n-button { --n-height: 34px; border-radius: 9px; flex: none; }
.aff-share-note { margin-top: 10px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.65); }

/* === wallet box === */
.aff-wallet { display: flex; flex-direction: column; }
.aff-wallet-amount { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 10px 0 16px; margin: auto 0; }
.aff-coin { width: 30px; height: 30px; align-self: center; }
.aff-wallet-amount .user-affiliate-balance { font-size: 36px; font-weight: 800; color: var(--accent-1, #e9b033); line-height: 1; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.aff-unit { font-size: 14px; color: rgba(255,255,255,.75); }
.aff-wallet .n-button.btn-gold { --n-height: 46px; font-size: 16px; margin-top: auto; }
.aff-wallet .n-button.btn-gold[disabled] { filter: grayscale(.35); }
.aff-min { text-align: center; font-size: 13px; margin-top: 8px; }

/* === summary === */
.aff-summary-row { margin-top: 12px; }
.aff-summary-row .box { padding: 12px 6px; }
.aff-summary-row .box .lb { color: #fff; opacity: .8; }

/* === lists === */
.aff-list-box { margin-top: 12px; padding: 12px 10px; }
.aff-tabs { margin-bottom: 8px; }
.aff-tabs .theme1-tab { font-size: 16px; padding: 8px 6px; }
.aff-list-head { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; padding: 6px 14px; font-size: 12px; color: rgba(255,255,255,.6); }
.aff-list-head.cols-2 { grid-template-columns: 1fr 1fr; }
.aff-item { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; align-items: center; padding: 10px 14px; margin-bottom: 8px; }
.aff-item.cols-2 { grid-template-columns: 1fr 1fr; }
.aff-col-date { display: flex; flex-direction: column; line-height: 1.25; }
.aff-col-date .d { font-weight: 700; font-size: 14px; }
.aff-col-date .t { font-size: 12px; color: rgba(255,255,255,.65); }
.aff-col-date .idx { display: none; }
.aff-col-user { font-weight: 600; font-size: 15px; word-break: break-all; display: flex; align-items: center; gap: 6px; }
.aff-col-user.ta-r { justify-content: flex-end; }
.aff-user-ico { width: 18px; height: 18px; opacity: .85; }
.aff-col-amt { text-align: right; font-size: 17px; }
.aff-empty { min-height: 260px; border-color: rgba(255,255,255,.4); background: rgba(0,0,0,.35); }
.aff-empty img { width: 64px; height: auto; opacity: .9; }
.aff-empty p { font-size: 14px; }
.aff-page .load-more .n-button { --n-height: 40px; padding: 0 28px; }

/* === terms === */
.aff-terms { margin-top: 12px; padding: 0; overflow: hidden; }
.aff-terms-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; user-select: none; }
.aff-terms-arrow { color: var(--accent-1, #e9b033); transition: transform .2s; display: inline-block; }
.aff-terms.open .aff-terms-arrow { transform: rotate(180deg); }
.aff-terms-body { padding: 0 14px 14px; font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.85); }
.aff-terms-body img { max-width: 100%; }

/* === desktop === */
@media (min-width: 768px) {
  .aff-top { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .aff-share-body { flex-direction: row; align-items: center; }
  .aff-share-link { flex: 1; }
  .aff-page .qr-box img { width: 150px; height: 150px; }
  .aff-wallet-amount .user-affiliate-balance { font-size: 40px; }
  .aff-list-head, .aff-item { padding-left: 18px; padding-right: 18px; }
}
@media (min-width: 1024px) {
  .aff-page .qr-box img { width: 170px; height: 170px; }
}
