/* Spellbook drops page */

.layout--guide-nav {
  max-width: min(100%, calc(90rem + 13rem + 2rem));
}

.layout--guide-nav .guide-main {
  max-width: 90rem;
}

.layout--guide-nav .flow-nav {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
}

.layout--guide-nav .flow-nav nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0;
  scrollbar-width: none;
}

.layout--guide-nav .flow-nav nav::-webkit-scrollbar {
  display: none;
}

.flow-nav__title {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-nav li a.is-active {
  border-color: rgba(51, 255, 167, 0.45);
  background: rgba(51, 255, 167, 0.1);
  color: var(--accent);
}

.spellbook-meta {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.spellbook-skill-link {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.spellbook-skill-link:hover,
.spellbook-skill-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.spellbook-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #1f1f1f;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.spellbook-toolbar {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #2c2c2c;
  background: #242424;
}

.spellbook-toolbar input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #1a1a1a;
  color: var(--text);
  font: inherit;
}

.spellbook-toolbar input:focus-visible {
  outline: 2px solid rgba(51, 255, 167, 0.45);
  outline-offset: 1px;
}

.spellbook-feedback {
  min-height: 1.25rem;
  margin: 0;
  padding: 0.55rem 1rem 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.spellbook-class-section {
  scroll-margin-top: 1rem;
}

.spellbook-table-shell {
  overflow-x: auto;
  background: #1f1f1f;
}

.spellbook-table {
  width: 100%;
  min-width: 76rem;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.45;
}

.spellbook-table col.spellbook-col-level {
  width: 4.5rem;
}

.spellbook-table col.spellbook-col-skill {
  width: 13%;
}

.spellbook-table col.spellbook-col-book {
  width: 22%;
}

.spellbook-table col.spellbook-col-mob {
  width: 20%;
}

.spellbook-table col.spellbook-col-chance {
  width: 6.5rem;
}

.spellbook-table col.spellbook-col-loc {
  width: 28%;
}

.spellbook-table th,
.spellbook-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #303030;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.spellbook-table th.spellbook-col-loc,
.spellbook-table td.spellbook-col-loc {
  min-width: 16rem;
  overflow-wrap: normal;
  word-break: normal;
}

.spellbook-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #242424;
  color: #b5b5b5;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: 0 1px 0 #353535;
}

.spellbook-table tbody tr {
  background: #202020;
}

.spellbook-table tbody tr:nth-child(even):not(.spellbook-group-row):not(.spellbook-drop-subrow) {
  background: #232323;
}

.spellbook-table tbody tr.spellbook-drop-group + tr.spellbook-drop-subrow,
.spellbook-table tbody tr.spellbook-drop-subrow + tr.spellbook-drop-subrow {
  background: inherit;
}

.spellbook-table tbody tr.spellbook-drop-subrow td {
  border-top: 1px dashed #383838;
}

.spellbook-table tbody tr.spellbook-drop-group + tr.spellbook-drop-subrow td {
  border-top: 1px solid #383838;
}

.spellbook-table tbody tr.spellbook-drop-group td[rowspan] {
  border-top: none;
}

.spellbook-table tbody tr:hover:not(.spellbook-group-row) {
  background: #292f2c;
}

.spellbook-group-row {
  scroll-margin-top: 1rem;
}

.spellbook-group-row td {
  padding: 0.65rem 0.75rem;
  background: linear-gradient(90deg, #2a2a2a, #262626);
  border-bottom: 1px solid #383838;
  vertical-align: middle;
}

.spellbook-group-row__zh {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.spellbook-group-row__en {
  margin-left: 0.55rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.spellbook-col-level {
  text-align: center;
  color: #e8e8e8;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.spellbook-col-skill {
  color: #e8e8e8;
  font-weight: 600;
  vertical-align: middle;
}

.spellbook-col-chance {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.spellbook-col-chance strong {
  color: #ffd27a;
  font-weight: 800;
}

.spellbook-col-book .item-name,
.spellbook-col-mob .item-name,
.spellbook-col-skill .item-name {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  max-width: 100%;
}

.spellbook-col-book .item-name__content,
.spellbook-col-mob .item-name__content,
.spellbook-col-skill .item-name__content {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.spellbook-col-book .item-name__class-1,
.spellbook-col-mob .item-name__class-1,
.spellbook-col-skill .item-name__class-1 {
  line-height: 1.35;
  word-break: break-word;
}

.spellbook-col-book .item-name__additional,
.spellbook-col-mob .item-name__additional,
.spellbook-col-skill .item-name__additional {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.spellbook-drop-amt {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.spellbook-loc-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.spellbook-loc-cell__main {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.5rem;
}

.spellbook-loc-cell__main strong {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.spellbook-loc-cell__sub {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}

.spellbook-loc-link {
  color: var(--link);
  text-decoration: none;
}

.spellbook-loc-link:hover,
.spellbook-loc-link:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
}

.spellbook-col-loc .spawn-link {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.78rem;
}

.spellbook-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .guide-nav-shell {
    grid-template-columns: 1fr;
  }

  .flow-nav {
    position: static;
  }

  .flow-nav ol {
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  }
}
