/* ------ Class database (classdb.php) ------- */

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

/* race tabs */
#cdb .cdb-races { margin: 4px 0 8px 0; border-bottom: 2px solid #5b3d21; }
#cdb .cdb-races a, #cdb .cdb-races a:link, #cdb .cdb-races a:visited {
  display: inline-block; padding: 4px 14px; margin-right: 2px;
  border: 1px solid #8d7458; border-bottom: 0;
  background: #e6d7bf; color: #5b3d21; font-weight: bold; text-decoration: none;
}
#cdb .cdb-races a:hover { background: #efe3cf; color: #000; }
#cdb .cdb-races a.on { background: #5b3d21; border-color: #5b3d21; color: #f0e4d2; }

/* class tree: base class + cards hanging off a line (emblems from style/emb/) */
#cdb .cdb-classes { margin-bottom: 12px; }
#cdb .tree { margin-bottom: 10px; }
#cdb a.base, #cdb a.base:link, #cdb a.base:visited {
  display: flex; align-items: center; gap: 10px; margin: 0 0 6px 0; padding: 2px 6px 2px 0;
  color: #2f1d0c; text-decoration: none;
}
#cdb a.base img.em { width: 44px; height: 44px; }
#cdb a.base b { font-size: 15px; }
#cdb a.base i { display: block; font-style: normal; font-size: 11px; color: #8d7458; }
#cdb a.base:hover b { text-decoration: underline; }
#cdb a.base.on b { color: #7a4a16; }
#cdb .line { margin: 0 0 6px 20px; padding-left: 12px; border-left: 2px solid #c0a98c; }
#cdb .grp { display: flex; align-items: center; }
#cdb .grp > a.card { margin: 0; }
#cdb a.card { height: 38px; box-sizing: border-box; }
/* fork: a stub from the 1st class, a vertical bar, a stub into each 2nd class */
#cdb .fork { flex: none; position: relative; width: 36px; align-self: stretch; margin: 0 6px; }
#cdb .fork::before { content: ''; position: absolute; left: 0; top: 50%; width: 18px; height: 2px; background: #8d7458; }
#cdb .fork::after { content: ''; position: absolute; left: 18px; top: 19px; bottom: 19px; width: 2px; background: #8d7458; }
#cdb .pair { display: flex; flex-direction: column; gap: 4px; }
#cdb .pair a.card { position: relative; margin: 0; }
#cdb .pair a.card::before { content: ''; position: absolute; left: -18px; top: 50%; width: 18px; height: 2px; background: #8d7458; }
#cdb a.card, #cdb a.card:link, #cdb a.card:visited {
  display: flex; align-items: center; gap: 8px; margin: 0 8px 4px 0; padding: 4px 10px 4px 6px;
  border: 1px solid #b59c7b; background: linear-gradient(#f5ecdd, #e6d7bf);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2); color: #442b17; font-size: 12px; text-decoration: none; white-space: nowrap;
}
#cdb a.card img.em { width: 30px; height: 30px; }
#cdb a.card small { display: block; font-size: 10px; color: #8d7458; }
#cdb a.card:hover { border-color: #5b3d21; color: #000; }
#cdb a.card.on { background: linear-gradient(#6b4a2a, #4a2f18); border-color: #3a2411; color: #f0e4d2; font-weight: bold; }
#cdb a.card.on small { color: #d9c29a; font-weight: normal; }

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

#cdb .cdb-count { margin: 4px 0 6px 0; color: #6d5a44; }
#cdb .cdb-count b { color: #2f1d0c; font-size: 15px; }
#cdb .cdb-count .n { float: right; font-style: italic; }
#cdb .cdb-empty { margin: 4px 0; color: #6d5a44; font-style: italic; }

/* skill list */
#cdb table.cdb-list { width: 100%; border-collapse: collapse; }
#cdb table.cdb-list th {
  padding: 3px 5px; color: #6d5a44; font-weight: normal; text-align: left; white-space: nowrap;
  border-bottom: 1px solid #c0a98c;
}
#cdb table.cdb-list th.num, #cdb table.cdb-list td.num { text-align: right; white-space: nowrap; }
#cdb table.cdb-list td { padding: 3px 5px; border-bottom: 1px solid #dacdb6; vertical-align: middle; }
#cdb table.cdb-list tr.grp td {
  padding: 8px 5px 3px 5px; background: rgba(91, 61, 33, .12);
  color: #442b17; font-weight: bold; font-size: 12px;
}
#cdb table.cdb-list tr.sk { cursor: pointer; }
#cdb table.cdb-list tr.sk:hover td { background: #efe3cf; }
#cdb table.cdb-list tr.sk.open td { background: #e9dcc5; border-bottom: 0; }
#cdb table.cdb-list b.nm { color: #2f2115; }
#cdb table.cdb-list .lv { color: #6d5a44; font-size: 11px; white-space: nowrap; }
#cdb table.cdb-list td.c-sk { white-space: nowrap; }
#cdb table.cdb-list td.c-ty { white-space: nowrap; }
#cdb table.cdb-list td.c-bk { font-size: 11px; }
#cdb img.si { width: 24px; height: 24px; vertical-align: middle; margin-right: 6px; border: 1px solid #3a2411; }
#cdb .si.noicon { display: inline-block; width: 24px; height: 24px; margin-right: 6px; vertical-align: middle; background: #3a2411; }
#cdb img.ii { width: 18px; height: 18px; vertical-align: middle; margin-right: 4px; border: 1px solid #3a2411; }
#cdb .ii.noicon { display: inline-block; width: 18px; height: 18px; margin-right: 4px; vertical-align: middle; background: #3a2411; }
#cdb a.il, #cdb a.il:link, #cdb a.il:visited { color: #5b3d21; text-decoration: none; font-weight: bold; white-space: nowrap; }
#cdb a.il:hover { color: #000; text-decoration: underline; }
#cdb i.ty {
  display: inline-block; padding: 0 6px; font-style: normal; font-size: 10px; line-height: 16px;
  border: 1px solid #b59c7b; background: #e6d7bf; color: #442b17;
}
#cdb i.tyP { background: #dfe4d0; border-color: #9fae82; color: #3f5a2b; }
#cdb i.tyT { background: #e4dbe8; border-color: #a996b5; color: #4c3760; }
#cdb .auto { color: #3f6b2b; font-size: 11px; font-weight: bold; }

/* expanded row */
#cdb table.cdb-list tr.det { display: none; }
#cdb table.cdb-list tr.det.open { display: table-row; }
#cdb table.cdb-list tr.det td { padding: 2px 10px 10px 40px; background: #e9dcc5; }
#cdb .desc { margin-bottom: 6px; color: #2f2115; line-height: 1.4; }
#cdb .facts { line-height: 20px; }
#cdb .facts > span { display: inline-block; margin-right: 14px; white-space: nowrap; }
#cdb .facts .k { color: #6d5a44; margin-right: 3px; }
#cdb .facts .k:after { content: ':'; }

/* item popup (style/itempop.js builds #idb, styled by style/itemdb.css) */
#idb .idb-note a, #idb .idb-note a:link, #idb .idb-note a:visited { float: right; color: #5b3d21; font-weight: bold; font-style: normal; text-decoration: none; }
#idb .idb-note a:hover { text-decoration: underline; }

/* ---- phones / tablets (same breakpoint as style/mobile.css) ---- */
@media screen and (max-width: 820px) {
  html body #cdb .cdb-q { display: block; width: 100%; margin-bottom: 4px; font-size: 16px; box-sizing: border-box; }
  html body #cdb .cdb-races a { padding: 4px 8px; font-size: 12px; }
  html body #cdb .line { margin-left: 8px; padding-left: 8px; }
  html body #cdb a.card { padding: 3px 8px 3px 5px; }
  html body #cdb .fork { width: 22px; margin: 0 4px; }
  html body #cdb .fork::before { width: 11px; }
  html body #cdb .fork::after { left: 11px; }
  html body #cdb .pair a.card::before { left: -11px; width: 11px; }
  html body #cdb table.cdb-list th.c-ty, html body #cdb table.cdb-list td.c-ty { display: none; }
  html body #cdb table.cdb-list td.c-sk { white-space: normal; }
  html body #cdb table.cdb-list tr.det td { padding-left: 10px; }
  html body #cdb .cdb-count .n { float: none; display: block; }
}
