/* ---- เพื่อน (2026-10-26, js/friends.js): the LORDNINE friend window the user sent - three tabs, ✕, rows of class mark /
   name / guild line / status, the count at the foot - in the game's own obsidian + gold (the user: "ปรับ ui ให้เข้ากับเกม",
   the same skin as the mailbox and the guild screen) ---- */
#friends { position: fixed; inset: 0; z-index: 990; display: flex; align-items: center; justify-content: center; background: rgba(8, 6, 14, 0.55); font-family: Mali, Fredoka, sans-serif; }
#friends[hidden] { display: none; }
#friends .frd-win { position: relative; width: min(612px, calc(100vw - 24px)); height: min(810px, calc(100vh - 32px)); display: flex; flex-direction: column; border-radius: 14px; border: 2px solid #c9a24a; background: linear-gradient(180deg, #2a2233, #19141f); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 220, 140, 0.12); color: #f3e9d2; overflow: hidden; }
#friends .frd-top { display: flex; align-items: center; gap: 6px; padding: 8px 10px 0 14px; border-bottom: 1px solid rgba(201, 162, 74, 0.45); background: linear-gradient(180deg, rgba(201, 162, 74, 0.2), rgba(201, 162, 74, 0.04)); }
#friends .frd-tabs { display: flex; gap: 2px; flex: 1; min-width: 0; align-self: stretch; }
#friends .frd-tabs button { position: relative; flex: 0 1 150px; min-width: 0; height: 52px; padding: 0 10px; border: 0; border-bottom: 3px solid transparent; background: none; color: #b8ab8c; font: 700 1rem Mali, sans-serif; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#friends .frd-tabs button:not(.on):hover { color: #e6d3a3; }
#friends .frd-tabs button.on { color: #ffe2a0; border-bottom-color: #e8b94a; background: linear-gradient(rgba(232, 185, 74, 0), rgba(232, 185, 74, 0.16)); }
#friends .frd-dot { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e5484d; color: #fff; font-style: normal; font-size: 0.72rem; line-height: 18px; font-family: Fredoka, sans-serif; }
#friends .frd-x { flex: none; width: 38px; height: 38px; border-radius: 8px; border: 1px solid #c9a24a; background: rgba(0, 0, 0, 0.35); color: #ffe2a0; font-size: 1.1rem; cursor: pointer; }
#friends .frd-x:hover { background: rgba(232, 185, 74, 0.2); }
#friends .frd-add { display: flex; gap: 8px; margin: 14px 16px 0; }
#friends .frd-in { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(201, 162, 74, 0.5); background: rgba(0, 0, 0, 0.35); color: #f3e9d2; font: inherit; font-size: 0.98rem; }
#friends .frd-in::placeholder { color: #8f8470; }
#friends .frd-in:focus { outline: none; border-color: #e8b94a; }
#friends .frd-list { flex: 1; min-height: 0; overflow-y: auto; margin: 14px 16px 0; padding: 6px; border-radius: 10px; border: 1px solid rgba(201, 162, 74, 0.3); background: rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; gap: 6px; }
#friends .frd-row { display: flex; align-items: center; gap: 12px; min-height: 100px; padding: 8px 14px 8px 8px; border-radius: 10px; border: 1px solid rgba(201, 162, 74, 0.28); background: rgba(255, 255, 255, 0.04); cursor: pointer; }
#friends .frd-row:hover, #friends .frd-row:focus-visible { background: rgba(255, 226, 160, 0.08); border-color: #e8b94a; outline: none; }
#friends .frd-ico { flex: none; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid rgba(201, 162, 74, 0.55); background: radial-gradient(circle at 50% 40%, #3a2f45, #151019); }
#friends .frd-ico img { width: 70px; height: 70px; object-fit: contain; }
#friends .frd-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
#friends .frd-nm b { font-size: 1.18rem; color: #ffe9bf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#friends .frd-nm small { font-size: 0.92rem; color: #cbbd9c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#friends .frd-g { font-style: normal; color: #e8b94a; }
#friends .frd-st { flex: none; min-width: 110px; text-align: center; font-size: 1rem; font-weight: 700; }
#friends .frd-st.on { color: #9fe07a; }
#friends .frd-st.off { color: #ff7a6e; }
#friends .frd-st.wait { min-width: 0; color: #cbbd9c; font-size: 0.9rem; font-weight: 400; }
#friends .frd-acts { flex: none; display: flex; align-items: center; gap: 8px; }
#friends .frd-btn { height: 38px; min-width: 80px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(201, 162, 74, 0.6); background: rgba(0, 0, 0, 0.35); color: #f3e9d2; font: 700 0.92rem Mali, sans-serif; cursor: pointer; }
#friends .frd-btn:hover { background: rgba(232, 185, 74, 0.18); }
#friends .frd-btn.ok { border-color: #f0c75e; background: linear-gradient(180deg, #e8b94a, #a8781f); color: #2a1a05; }
#friends .frd-btn.ok:hover { background: linear-gradient(180deg, #f5cd66, #b98a2a); }
#friends .frd-empty { margin: auto; padding: 24px; max-width: 380px; text-align: center; color: #b8ab8c; line-height: 1.6; }
#friends .frd-foot { padding: 12px 0 14px; text-align: center; font-size: 1.02rem; color: #e8d4a6; border-top: 1px solid rgba(201, 162, 74, 0.3); margin-top: 14px; }
#friends .frd-menu { position: fixed; z-index: 2; min-width: 170px; display: flex; flex-direction: column; border-radius: 10px; border: 1px solid #c9a24a; background: linear-gradient(180deg, #2a2233, #19141f); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55); overflow: hidden; }
#friends .frd-menu[hidden] { display: none; }
#friends .frd-menu b { padding: 9px 12px; border-bottom: 1px solid rgba(201, 162, 74, 0.4); color: #ffe2a0; }
#friends .frd-menu button { padding: 10px 12px; border: 0; background: transparent; color: #f3e9d2; font: inherit; text-align: left; cursor: pointer; }
#friends .frd-menu button:hover { background: rgba(255, 226, 160, 0.1); }
#friends .frd-menu button.del { color: #ff8a7e; }
#friends .frd-menu button.armed { background: #6b2b2b; color: #fff; }
@media (max-width: 560px) {
  #friends .frd-tabs button { height: 46px; font-size: 0.84rem; padding: 0 5px; }
  #friends .frd-row { min-height: 76px; gap: 8px; padding: 6px 8px 6px 6px; }
  #friends .frd-ico { width: 60px; height: 60px; }
  #friends .frd-ico img { width: 50px; height: 50px; }
  #friends .frd-st { min-width: 66px; font-size: 0.86rem; }
  #friends .frd-btn { min-width: 0; padding: 0 9px; }
}
