/* ------ NPC database (npcdb.php) ------- */

#ndb { text-align: left; }
#ndb .dim { color: #8d7458; font-weight: normal; font-size: 11px; }

#ndb .ndb-bar { margin: 6px 0 6px 0; line-height: 30px; }
#ndb .ndb-q {
  width: 250px;
  padding: 5px 7px;
  border: 1px solid #8d7458;
  background: #f5ecdd;
  color: #2f2115;
  font-family: Sylfaen, Trebuchet MS, Verdana;
  font-size: 13px;
}
#ndb select, #ndb .ndb-lv input {
  padding: 4px;
  border: 1px solid #8d7458;
  background: #f5ecdd;
  color: #2f2115;
  font-family: Sylfaen, Trebuchet MS, Verdana;
  font-size: 12px;
}
#ndb select:disabled { opacity: .45; }
#ndb .ndb-lv { color: #6d5a44; white-space: nowrap; }
#ndb .ndb-lv input { width: 26px; text-align: center; }
#ndb .ndb-reset, #ndb .ndb-reset:link, #ndb .ndb-reset:visited { margin-left: 4px; color: #5b3d21; font-size: 11px; font-weight: bold; }
#ndb .ndb-reset:hover { color: #000; }

#ndb .ndb-count { margin: 4px 0 6px 0; color: #6d5a44; font-style: italic; }

/* result list */
#ndb table.ndb-list { width: 100%; border-collapse: collapse; }
#ndb table.ndb-list th {
  padding: 3px 5px; color: #6d5a44; font-weight: normal; text-align: left; white-space: nowrap;
  border-bottom: 1px solid #c0a98c; cursor: pointer; -webkit-user-select: none; user-select: none;
}
#ndb table.ndb-list th:hover { color: #2f1d0c; text-decoration: underline; }
#ndb table.ndb-list th.num, #ndb table.ndb-list td.num { text-align: right; }
#ndb table.ndb-list th .arr { display: inline-block; width: 10px; margin-left: 2px; font-size: 9px; color: #b09a7c; }
#ndb table.ndb-list th .arr:after { content: '\2195'; }
#ndb table.ndb-list th.asc .arr:after { content: '\25B2'; color: #442b17; }
#ndb table.ndb-list th.desc .arr:after { content: '\25BC'; color: #442b17; }
#ndb table.ndb-list th.asc, #ndb table.ndb-list th.desc { color: #2f1d0c; font-weight: bold; }
#ndb table.ndb-list tbody tr { cursor: pointer; }
#ndb table.ndb-list tbody tr:hover td { background: #efe3cf; }
#ndb table.ndb-list td { padding: 3px 5px; border-bottom: 1px solid #dacdb6; vertical-align: middle; }
#ndb table.ndb-list td.num { white-space: nowrap; }
#ndb table.ndb-list td.c-ty, #ndb table.ndb-list td.c-ar { color: #6d5a44; font-size: 11px; }
#ndb table.ndb-list td.c-ar { white-space: nowrap; }
#ndb table.ndb-list b.nm { color: #2f2115; }
#ndb table.ndb-list tr.boss b.nm { color: #7a0d0d; }
#ndb table.ndb-list tr.boss td { background: rgba(140, 16, 16, .05); }
#ndb table.ndb-list .hit { display: block; color: #3f6b2b; font-size: 11px; }
#ndb .agr { color: #b01818; font-weight: bold; }
#ndb b.rb {
  display: inline-block; margin-right: 4px; padding: 0 3px;
  background: #8c1010; color: #fff; font-size: 9px; line-height: 13px; vertical-align: 1px;
}
#ndb i.lvb {
  display: inline-block; min-width: 18px; padding: 0 3px; font-style: normal; font-weight: bold;
  text-align: center; border: 1px solid rgba(40, 20, 5, .35); color: #2f1d0c;
}
#ndb i.lvb.lv1 { background: rgba(90, 170, 60, .45); }
#ndb i.lvb.lv2 { background: rgba(220, 190, 40, .5); }
#ndb i.lvb.lv3 { background: rgba(225, 120, 30, .55); }
#ndb i.lvb.lv4 { background: rgba(200, 30, 30, .5); color: #fff; }

#ndb .ndb-more { margin: 8px 0; text-align: center; }
#ndb .ndb-morebtn, #ndb .ndb-morebtn:link, #ndb .ndb-morebtn:visited {
  display: inline-block; padding: 5px 14px; border: 1px solid #3a2411; background: #5b3d21;
  color: #f0e4d2; font-weight: bold; text-decoration: none;
}
#ndb .ndb-morebtn:hover { background: #442b17; }

/* popup */
#ndb .ndb-modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .55);
}
#ndb .ndb-modal.open { display: block; }
#ndb .ndb-dialog {
  position: relative;
  width: 640px;
  max-width: 94%;
  max-height: 88%;
  margin: 4vh auto 0 auto;
  overflow-y: auto;
  padding: 14px 18px 16px 18px;
  border: 2px solid #3a2411;
  background: #efe3cf;
  color: #2f2115;
  text-align: left;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .6);
}
#ndb .ndb-close, #ndb .ndb-close:link, #ndb .ndb-close:visited {
  position: absolute; right: 10px; top: 4px; z-index: 2;
  color: #5b3d21; font-size: 26px; font-weight: bold; text-decoration: none;
}
#ndb .ndb-close:hover { color: #000; }

#ndb .ndb-body h3 { margin: 0 30px 2px 0; font-size: 19px; color: #2f1d0c; }
#ndb .ndb-body .sub { margin-bottom: 4px; color: #6d5a44; }
#ndb .ndb-body .sub.where { margin-bottom: 8px; }
#ndb .ndb-body b.rb { font-size: 11px; line-height: 16px; padding: 0 4px; vertical-align: 2px; }
#ndb .ndb-head { display: flex; align-items: center; gap: 14px; min-height: 40px; }
#ndb .ndb-head > div { flex: 1; min-width: 0; }
#ndb .ndb-img {
  flex: none; width: 150px; height: 150px;
  border: 1px solid #c0a98c;
  background: radial-gradient(circle at 50% 45%, #fbf4e8 0%, #e2d2b8 75%);
}
#ndb .ndb-body h4 {
  margin: 14px 0 4px 0;
  padding-bottom: 3px;
  border-bottom: 1px solid #c0a98c;
  color: #442b17;
  font-size: 13px;
}

#ndb table.ndb-stats { width: 100%; border-collapse: collapse; }
#ndb table.ndb-stats td { padding: 3px 6px; border-bottom: 1px solid #dacdb6; }
#ndb table.ndb-stats td.k { color: #6d5a44; width: 22%; }
#ndb table.ndb-stats td.v { font-weight: bold; width: 28%; }

#ndb .ndb-traits { margin-top: 8px; line-height: 22px; }
#ndb .ndb-traits .lbl { color: #6d5a44; }
#ndb .ndb-traits i {
  display: inline-block; margin: 0 4px 0 0; padding: 0 6px; font-style: normal; font-size: 11px; line-height: 17px;
  border: 1px solid #b59c7b; background: #e6d7bf; color: #442b17;
}

#ndb table.ndb-drops { width: 100%; border-collapse: collapse; }
#ndb table.ndb-drops th {
  padding: 3px 6px; color: #6d5a44; font-weight: normal; text-align: left;
  border-bottom: 1px solid #c0a98c;
}
#ndb table.ndb-drops td { padding: 2px 6px; border-bottom: 1px solid #dacdb6; vertical-align: middle; }
#ndb table.ndb-drops td.num, #ndb table.ndb-drops th.num { text-align: right; white-space: nowrap; }
#ndb table.ndb-drops tr.grp td {
  padding-top: 6px;
  background: rgba(91, 61, 33, .12);
  color: #442b17;
  font-weight: bold;
  font-size: 11px;
}
#ndb table.ndb-drops img { width: 24px; height: 24px; vertical-align: middle; margin-right: 6px; border: 1px solid #3a2411; }
#ndb table.ndb-drops .noicon { display: inline-block; width: 24px; height: 24px; margin-right: 6px; vertical-align: middle; background: #3a2411; }
#ndb table.ndb-drops a, #ndb .ndb-links a { color: #5b3d21; text-decoration: none; font-weight: bold; }
#ndb table.ndb-drops a:hover, #ndb .ndb-links a:hover { color: #000; text-decoration: underline; }
#ndb table.ndb-shop th.sort { cursor: pointer; white-space: nowrap; }
#ndb table.ndb-shop th.sort:hover { color: #2f1d0c; text-decoration: underline; }
#ndb table.ndb-shop th .arr { display: inline-block; width: 10px; margin-left: 3px; font-size: 9px; color: #b09a7c; }
#ndb table.ndb-shop th .arr:after { content: '\2195'; }
#ndb table.ndb-shop th.asc .arr:after { content: '\25B2'; color: #442b17; }
#ndb table.ndb-shop th.desc .arr:after { content: '\25BC'; color: #442b17; }
#ndb .ndb-links { margin: 2px 0; line-height: 19px; }
#ndb .ndb-empty { margin: 4px 0; color: #6d5a44; font-style: italic; }
#ndb .ndb-note { margin-top: 12px; color: #6d5a44; font-size: 11px; font-style: italic; }

/* spawn map inside the popup */
#ndb .ndb-map { margin-top: 6px; border: 1px solid #8d7458; }
#ndb .nm-tabs a, #ndb .nm-tabs a:link, #ndb .nm-tabs a:visited {
  display: inline-block; padding: 2px 10px; color: #5b3d21; font-weight: bold; text-decoration: none;
}
#ndb .nm-tabs a.on { background: #5b3d21; color: #f0e4d2; }
#ndb .nm-view {
  position: relative; height: 300px; overflow: hidden;
  background: #d8cdb8; cursor: grab; -webkit-user-select: none; user-select: none; touch-action: none;
}
#ndb .nm-view.drag { cursor: grabbing; }
#ndb .nm-view.empty { height: 60px; cursor: default; }
#ndb .nm-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#ndb .nm-img { display: block; max-width: none; }
#ndb .nm-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
#ndb .nm-svg .nm-area { fill: rgba(200, 30, 30, .30); stroke: #8c1010; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#ndb .nm-svg .nm-dot  { fill: #ffe14a; stroke: #3a1d00; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#ndb .nm-pin .dot  { fill: #ffe14a; stroke: #3a1d00; stroke-width: 2; vector-effect: non-scaling-stroke; }
#ndb .nm-pin .ring { fill: none; stroke: #ffe14a; stroke-width: 3; vector-effect: non-scaling-stroke;
                     transform-box: fill-box; transform-origin: center; animation: nmPin 1.4s ease-out infinite; }
#ndb .nm-pin text  { fill: #fff6d0; stroke: #1d0f04; stroke-width: 3px; paint-order: stroke; font: bold 13px Verdana, sans-serif; text-anchor: middle; }
@keyframes nmPin { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
#ndb .nm-zoom { position: absolute; right: 6px; top: 6px; }
#ndb .nm-view.empty .nm-zoom { display: none; }
#ndb .nm-zoom a, #ndb .nm-zoom a:link, #ndb .nm-zoom a:visited {
  display: block; width: 24px; margin-bottom: 3px; line-height: 22px; text-align: center;
  border: 1px solid #3a2411; background: rgba(47, 29, 12, .85); color: #f0e4d2; font-weight: bold; font-size: 15px; text-decoration: none;
}
#ndb .nm-msg { position: absolute; left: 0; right: 0; top: 45%; margin-top: -8px; text-align: center; color: #442b17; font-weight: bold; }
#ndb .nm-view.empty .nm-msg { top: 20px; margin: 0; }
#ndb .nm-foot { padding: 4px 8px; font-size: 11px; overflow: hidden; }
#ndb .nm-full, #ndb .nm-full:link, #ndb .nm-full:visited { float: right; color: #5b3d21; font-weight: bold; text-decoration: none; }
#ndb .nm-full:hover { text-decoration: underline; }

/* ---- phones / tablets (same breakpoint as style/mobile.css) ---- */
@media screen and (max-width: 820px) {
  html body #ndb .ndb-q { display: block; width: 100%; margin-bottom: 4px; font-size: 16px; box-sizing: border-box; }
  html body #ndb select, html body #ndb .ndb-lv input { font-size: 16px; margin: 0 2px 4px 0; max-width: 100%; }
  html body #ndb .ndb-lv input { width: 40px; }
  html body #ndb table.ndb-list th.c-sp, html body #ndb table.ndb-list td.c-sp,
  html body #ndb table.ndb-list th.c-ty, html body #ndb table.ndb-list td.c-ty { display: none; }
  html body #ndb table.ndb-list td { padding: 6px 4px; }
  html body #ndb table.ndb-list td.c-ar { white-space: normal; }
  html body #ndb .ndb-modal { z-index: 1100; }
  html body #ndb .ndb-dialog {
    width: auto; max-width: none; max-height: calc(100% - 16px);
    margin: 8px 8px 0 8px; padding: 12px; box-sizing: border-box;
  }
  html body #ndb .ndb-close, html body #ndb .ndb-close:link, html body #ndb .ndb-close:visited {
    position: -webkit-sticky; position: sticky; top: 0; float: right; z-index: 3;
    width: 44px; height: 44px; margin: -8px -8px 0 4px;
    border: 1px solid rgba(58, 36, 17, .35); border-radius: 50%;
    background: rgba(58, 36, 17, .18); box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
    color: #3a2411; font-size: 40px; font-weight: bold; line-height: 42px; text-align: center;
    text-shadow: 0 0 3px #efe3cf, 0 0 6px #efe3cf;
  }
  html body #ndb .ndb-img { width: 96px; height: 96px; }
  html body #ndb table.ndb-stats td.k, html body #ndb table.ndb-stats td.v { width: auto; }
  html body #ndb .nm-view { height: 70vw; max-height: 380px; }
  html body #ndb .nm-zoom a { width: 34px; line-height: 32px; font-size: 18px; }
}
