@import url('/l2ui.css');

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: #000; color: #dcdcdc; overflow: hidden; user-select: none; font: 11px 'L2Cyr', 'L2Font', Tahoma, Arial, sans-serif; }
#canvas-container { position: fixed; inset: 0; }
#canvas-container canvas { display: block; }
#ui-layer { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.shim { display: none !important; }

.login-notice {
  position: absolute; top: calc(100% + 28px); left: 50%; transform: translateX(-50%);
  width: min(360px, calc(100vw - 24px)); padding: 6px 10px;
  background: rgba(0, 0, 0, .75); border-radius: 3px; color: #e6e0d3;
  font: 12px/1.4 Tahoma, Arial, sans-serif; text-align: center; pointer-events: none;
}

#location-debug {
  /* a small copy icon right under the FPS readout (l2ui.css #stat-fps: top centre, 120 px right) */
  position: fixed; top: 16px; left: 50%; transform: translateX(120px); z-index: 70; pointer-events: auto;
}
#location-debug-copy {
  display: grid; place-items: center; width: 18px; height: 18px; padding: 0; color: #9f9; cursor: pointer;
  background: rgba(8, 8, 11, .55); border: 1px solid rgba(160, 255, 160, .35); border-radius: 3px;
}
#location-debug-copy:hover { color: #dfd; border-color: rgba(200, 255, 200, .8); }
#location-debug-copy.copied { color: #ffd76a; border-color: #ffd76a; }
#location-debug.level-up #location-debug-copy { animation: debug-level-up 1.2s ease-out; }
@keyframes debug-level-up {
  0% { box-shadow: 0 0 0 0 rgba(245, 205, 108, 0); }
  20% { box-shadow: 0 0 18px 5px rgba(245, 205, 108, .95); color: #fff1bb; }
  100% { box-shadow: 0 0 0 0 rgba(245, 205, 108, 0); }
}

/* The page's first frame: the client's own loading screen (src/loadscreen.js), copied so the hand-over is seamless */
#loading-screen { position: fixed; inset: 0; background: #000; z-index: 200; font: 12px 'L2Cyr', 'L2Font', Tahoma, sans-serif; color: #b0a890; }
#loading-screen.hidden { display: none; }
#loading-screen .ls { position: absolute; left: 28px; bottom: 24px; display: flex; flex-direction: row-reverse; align-items: center; gap: 10px; text-shadow: 1px 1px 0 #000; }
#loading-screen .ls-icon { width: 22px; height: 22px; border: 3px solid #3a3528; border-top-color: #c8b680; border-radius: 50%; animation: ls-spin .9s linear infinite; }
@keyframes ls-spin { to { transform: rotate(360deg); } }

.raid-social-content {
  position: absolute; inset: 26px 9px 8px; color: #dcdcdc; line-height: 15px;
}
.raid-social-content button {
  border: 0; background-color: transparent; color: #e6dcbe; font: inherit; cursor: pointer;
}
.raid-social-content button:disabled { opacity: .5; cursor: default; }
.raid-social-actions { display: flex; gap: 4px; justify-content: center; margin-top: 6px; }
.raid-social-actions button, #raid-trade-offer button { width: 76px; height: 23px; }
.raid-player-columns, .raid-player-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 74px; gap: 6px; padding: 0 5px;
}
.raid-player-columns {
  height: 18px; align-items: center; color: #c8d2dc;
  background: rgba(105, 104, 100, .24); border: 1px solid #45423c; border-bottom: 0;
}
#raid-player-list {
  height: 153px; overflow: auto; list-style: none;
  background: rgba(0, 0, 0, .55); border: 1px solid #45423c;
}
.raid-social-content .raid-player-row {
  width: 100%; min-height: 19px; align-items: center; text-align: left; color: #dcdcdc;
}
.raid-player-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raid-player-row span:last-child, .raid-player-empty { color: #a3a3a3; }
.raid-social-content .raid-player-row:hover, .raid-social-content .raid-player-row[aria-pressed="true"] {
  background: rgba(255, 255, 255, .12);
}
.raid-player-empty { padding: 4px 5px; }
#raid-invite-title { min-height: 30px; padding: 4px; overflow-wrap: anywhere; }
#raid-trade p {
  padding: 2px 5px; background: rgba(0, 0, 0, .45);
  border: 1px solid #45423c; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
#raid-trade p + p { margin-top: 2px; }
#raid-trade-offer { display: grid; gap: 3px; margin-top: 6px; }
#raid-trade-offer label { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; }
#raid-trade-offer select, #raid-trade-offer input {
  min-height: 18px; border: 1px solid #45423c; background: #141419; color: #dcdcdc; font: inherit;
}
#raid-trade-offer button { justify-self: end; }


/* chat: player-name autocomplete (raid-names.js) */
#raid-name-complete {
  position: fixed; z-index: 10000; margin: 0; padding: 2px 0; list-style: none; min-width: 140px;
  background: rgba(16, 14, 12, 0.94); border: 1px solid #5a5040; font: 12px Tahoma, Arial, sans-serif; color: #dcd9dc;
}
#raid-name-complete li { padding: 2px 8px; cursor: pointer; }
#raid-name-complete li[aria-selected="true"], #raid-name-complete li:hover { background: #4a3f2c; color: #ffe9b0; }
