/* ═══════════════════════════════════════════════════════════════════════════
   LOTRO Fansite — Custom Theme Overrides
   Middle-earth inspired color palette and typography
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Color Variables (CSS Custom Properties) ────────────────────────────── */
:root {
  --lotro-gold: #C9A84C;
  --lotro-gold-light: #E5D49A;
  --lotro-dark: #1A1A2E;
  --lotro-dark-mid: #16213E;
  --lotro-dark-accent: #0F3460;
  --lotro-green: #2D6A4F;
  --lotro-green-light: #52B788;
  --lotro-parchment: #F5F0E1;
  --lotro-parchment-dark: #E8DCC8;
  --lotro-text: #2C2C2C;
  --lotro-text-light: #6B6B6B;
  --lotro-red: #9B2226;
}

/* ── Dark Select / Dropdown Option Readability ──────────────────────────── */
.dataTables_length select option,
.item-filter-select option {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
}

/* ── Header Overrides ───────────────────────────────────────────────────── */
#header {
  background-color: var(--lotro-dark);
  background-image:
    /* Subtle interlocking knot pattern via layered gradients */
    radial-gradient(ellipse 24px 16px at 24px 0px, transparent 60%, rgba(255,255,255,0.03) 61%, rgba(255,255,255,0.03) 65%, transparent 66%),
    radial-gradient(ellipse 24px 16px at 0px 16px, transparent 60%, rgba(255,255,255,0.03) 61%, rgba(255,255,255,0.03) 65%, transparent 66%),
    radial-gradient(ellipse 24px 16px at 48px 16px, transparent 60%, rgba(255,255,255,0.03) 61%, rgba(255,255,255,0.03) 65%, transparent 66%),
    radial-gradient(ellipse 24px 16px at 24px 32px, transparent 60%, rgba(255,255,255,0.03) 61%, rgba(255,255,255,0.03) 65%, transparent 66%),
    /* Horizontal braid lines */
    linear-gradient(0deg, transparent 30%, rgba(255,255,255,0.015) 31%, rgba(255,255,255,0.015) 33%, transparent 34%),
    linear-gradient(0deg, transparent 63%, rgba(255,255,255,0.015) 64%, rgba(255,255,255,0.015) 66%, transparent 67%),
    /* Top and bottom border accents */
    linear-gradient(to bottom, rgba(255,255,255,0.04) 0px, transparent 1px, transparent calc(100% - 1px), rgba(255,255,255,0.04) 100%);
  background-size: 48px 32px, 48px 32px, 48px 32px, 48px 32px, 100% 100%, 100% 100%, 100% 100%;
}

#header .navbar-backdrop {
  background-color: transparent;
}

.lotro-logo-text {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background-image: linear-gradient(to bottom, #f3f1ae 35%, #dab44f 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--lotro-gold) !important;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

#header .nav > ul > li > a {
  font-family: 'Cinzel', serif;
  font-weight: 400;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.25s ease;
}

#header .nav > ul > li > a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: radial-gradient(ellipse at center bottom, rgba(30, 90, 180, 0.45) 0%, rgba(20, 60, 140, 0.2) 50%, transparent 80%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

#header .nav > ul > li > a:hover::before,
#header .nav > ul > li.active > a::before {
  opacity: 1;
}

/* ── Hero Section ───────────────────────────────────────────────────────── */
.lotro-hero {
  position: relative;
  overflow: hidden;
}

.lotro-hero-bg {
  position: relative;
  min-height: 450px;
  background-size: cover;
  background-position: center top;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lotro-hero-bg .carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 46, 0.7) 0%,
    rgba(26, 26, 46, 0.5) 50%,
    rgba(26, 26, 46, 0.85) 100%
  );
}

.lotro-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 20px;
  max-width: 700px;
}

.lotro-hero-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 48px;
  text-transform: uppercase;
  letter-spacing: 2px;
  background-image: linear-gradient(to bottom, #f3f1ae 35%, #dab44f 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--lotro-gold);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  margin-bottom: 20px;
}

.lotro-hero-subtitle {
  font-family: 'Crimson Text', serif;
  font-size: 20px;
  color: var(--lotro-parchment);
  line-height: 1.6;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* ── Homepage Flow Boxes ────────────────────────────────────────────────── */
.lotro-home-flow {
  background: linear-gradient(180deg, #f8f2e5 0%, #efe5d1 100%);
  border-top: 1px solid #e2d2b4;
  border-bottom: 1px solid #e2d2b4;
}

.lotro-home-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.lotro-home-flow-card {
  display: block;
  background: #fff;
  border: 1px solid #eadcbf;
  border-radius: 8px;
  padding: 18px 16px;
  color: var(--lotro-text);
  box-shadow: 0 3px 12px rgba(26, 26, 46, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lotro-home-flow-card:hover,
.lotro-home-flow-card:focus {
  color: var(--lotro-text);
  border-color: var(--lotro-gold);
  box-shadow: 0 8px 18px rgba(15, 52, 96, 0.14);
  transform: translateY(-3px);
  text-decoration: none;
}

.lotro-home-flow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--lotro-dark);
  color: var(--lotro-gold);
  margin-bottom: 10px;
  font-size: 17px;
}

.lotro-home-flow-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--lotro-dark);
}

.lotro-home-flow-card p {
  margin: 0;
  font-family: 'Crimson Text', serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--lotro-text-light);
}

/* ── General Link Colors ─────────────────────────────────────────────────── */
a {
  color: var(--lotro-dark-accent);
  transition: color 0.15s ease;
}
a:hover, a:active, a:focus {
  color: var(--lotro-gold);
  text-decoration: none;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
.heading h2,
.post-title,
.card-title a,
h1, h2, h3 {
  font-family: 'Cinzel', serif;
}

.lotro-article {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--lotro-text);
}

.lotro-article h2,
.lotro-article h3,
.lotro-article h4,
.lotro-article h5 {
  font-family: 'Cinzel', serif;
  color: var(--lotro-dark);
  margin-top: 35px;
  margin-bottom: 15px;
}

.lotro-article h2 {
  font-size: 28px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--lotro-gold-light);
}

.lotro-article h3 {
  font-size: 22px;
  color: var(--lotro-dark-accent);
}

.lotro-article p {
  margin-bottom: 20px;
}

.lotro-article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lotro-article blockquote {
  border-left: 4px solid var(--lotro-gold);
  background: var(--lotro-parchment);
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

.lotro-article blockquote p {
  margin-bottom: 0;
}

/* Code blocks for game commands, item links, etc. */
.lotro-article code {
  background: var(--lotro-parchment);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--lotro-red);
}

.lotro-article pre {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  padding: 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 20px 0;
}

.lotro-article pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Tables for stats, gear lists, etc. */
.lotro-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
}

.lotro-article table th {
  background: var(--lotro-dark);
  color: var(--lotro-gold);
  font-family: 'Cinzel', serif;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
}

.lotro-article table td {
  padding: 10px 15px;
  border-bottom: 1px solid var(--lotro-parchment-dark);
}

.lotro-article table tr:nth-child(even) {
  background: var(--lotro-parchment);
}

.lotro-article table tr:hover {
  background: var(--lotro-parchment-dark);
}

/* Lists */
.lotro-article ul,
.lotro-article ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.lotro-article li {
  margin-bottom: 8px;
}

/* Article body links (non-item, non-mob) */
.lotro-article a:not(.lotro-item):not(.lotro-mob) {
  color: var(--lotro-dark-accent);
  text-decoration: underline;
  text-decoration-color: var(--lotro-gold-light);
  text-underline-offset: 2px;
}
.lotro-article a:not(.lotro-item):not(.lotro-mob):hover {
  color: var(--lotro-gold);
  text-decoration-color: var(--lotro-gold);
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card-title a {
  color: var(--lotro-dark);
}

.card-title a:hover {
  color: var(--lotro-gold);
  text-decoration: none;
}

/* ── Featured Card ──────────────────────────────────────────────────────── */
.lotro-featured-card .card-block {
  padding: 25px;
}

.lotro-featured-card .card-title {
  font-size: 24px;
}

/* ── Sidebar Widgets ────────────────────────────────────────────────────── */
.widget-sidebar {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.widget-sidebar .widget-title {
  font-family: 'Cinzel', serif;
  color: var(--lotro-dark);
  font-size: 16px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--lotro-gold-light);
}

.lotro-quick-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lotro-quick-nav li {
  margin-bottom: 8px;
}

.lotro-quick-nav li a {
  color: var(--lotro-text);
  display: block;
  padding: 6px 10px;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}

.lotro-quick-nav li a:hover {
  background: var(--lotro-parchment);
  color: var(--lotro-gold);
  text-decoration: none;
}

.lotro-quick-nav li a i {
  width: 20px;
  margin-right: 8px;
  color: var(--lotro-gold);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  background-color: var(--lotro-gold) !important;
  border-color: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #B8933E !important;
  border-color: #B8933E !important;
}

/* ── Breadcrumbs ────────────────────────────────────────────────────────── */
.breadcrumbs {
  background: var(--lotro-parchment);
}

.breadcrumb a {
  color: var(--lotro-gold);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
#footer {
  background: var(--lotro-dark);
}

#footer .footer-title {
  font-family: 'Cinzel', serif;
  color: var(--lotro-gold);
}

#footer a {
  color: rgba(255, 255, 255, 0.7);
}
#footer a:hover {
  color: var(--lotro-gold-light);
}
#footer ul > li > a {
  color: rgba(255, 255, 255, 0.7);
}
#footer ul > li > a:hover {
  color: var(--lotro-gold-light);
}
#footer .footer-social a {
  color: rgba(255, 255, 255, 0.8);
}
#footer .footer-social a:hover {
  color: var(--lotro-gold);
}

.footer-bottom {
  border-top-color: var(--lotro-dark-mid);
}

/* ── Badge Overrides ────────────────────────────────────────────────────── */
.badge-success {
  background-color: var(--lotro-green) !important;
}

/* ── Post Tags ──────────────────────────────────────────────────────────── */
.post-tags a {
  background: var(--lotro-parchment);
  color: var(--lotro-text);
  border-radius: 3px;
  padding: 4px 10px;
  margin-right: 5px;
  font-size: 13px;
  display: inline-block;
  margin-bottom: 5px;
  transition: background 0.2s;
}

.post-tags a:hover {
  background: var(--lotro-gold-light);
  color: var(--lotro-dark);
  text-decoration: none;
}

/* ── Heading Section ────────────────────────────────────────────────────── */
.heading i {
  color: var(--lotro-gold);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .lotro-hero-title {
    font-size: 32px;
  }

  .lotro-hero-subtitle {
    font-size: 16px;
  }

  .lotro-hero-bg {
    min-height: 300px;
  }

  .lotro-article {
    font-size: 16px;
  }

  .lotro-home-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .lotro-hero-title {
    font-size: 24px;
  }

  .lotro-hero-content {
    padding: 40px 15px;
  }

  .lotro-home-flow-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── LotRO Item Auto-Links ─────────────────────────────────────────────── */
.lotro-item {
  text-decoration: none;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  transition: color 0.15s ease;
}
.lotro-item:hover {
  text-decoration: none;
}
.lotro-item .lotro-item-text {
  border-bottom: 1px dotted;
}
.lotro-item:hover .lotro-item-text {
  border-bottom-style: solid;
}

/* LOTRO rarity colors */
.lotro-item.lotro-common { color: #f0f0f0; border-color: #999; }
.lotro-item.lotro-uncommon { color: #f5e642; border-color: #c8b400; }
.lotro-item.lotro-uncommon:hover { color: #fff176; }
.lotro-item.lotro-rare { color: #3ea8e6; border-color: #2980b9; }
.lotro-item.lotro-rare:hover { color: #64b5f6; }
.lotro-item.lotro-incomparable { color: #e040fb; border-color: #ab47bc; }
.lotro-item.lotro-incomparable:hover { color: #ea80fc; }
.lotro-item.lotro-legendary { color: #ff9800; border-color: #e65100; }
.lotro-item.lotro-legendary:hover { color: #ffb74d; }

/* Consumable links (no quality) use dark gold accent */
.lotro-item:not([class*="lotro-common"]):not([class*="lotro-uncommon"]):not([class*="lotro-rare"]):not([class*="lotro-incomparable"]):not([class*="lotro-legendary"]) {
  color: #B8860B;
  border-color: #8B6508;
}
.lotro-item:not([class*="lotro-common"]):not([class*="lotro-uncommon"]):not([class*="lotro-rare"]):not([class*="lotro-incomparable"]):not([class*="lotro-legendary"]):hover {
  color: #D4A017;
}

/* Tooltip on hover */
.lotro-item[data-item-stats]:hover::after {
  content: attr(data-item-stats);
  position: absolute;
  left: 0;
  bottom: 125%;
  background: #1a1a2e;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  pointer-events: none;
}



/* ─── Item Database Page ────────────────────────────────────────────────── */
.item-filter-label {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--lotro-gold);
  display: block;
  margin-bottom: 4px;
}
.item-filter-select {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px 10px;
}
.item-filter-select:focus {
  border-color: var(--lotro-gold);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.25);
}
.item-filter-select option {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  padding: 4px 8px;
}

#items-table {
  font-size: 14px;
}
#items-table thead th {
  background: var(--lotro-dark);
  color: var(--lotro-gold);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--lotro-gold);
}
#items-table tbody td {
  vertical-align: middle;
}

.lotro-item-link {
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}
.lotro-item-link:hover {
  text-decoration: underline;
}
.lotro-item-link.lotro-legendary { color: #ff9800; }
.lotro-item-link.lotro-legendary:hover { color: #ffb74d; }
.lotro-item-link.lotro-incomparable { color: #e040fb; }
.lotro-item-link.lotro-incomparable:hover { color: #ea80fc; }
.lotro-item-link.lotro-rare { color: #3ea8e6; }
.lotro-item-link.lotro-rare:hover { color: #64b5f6; }

.item-quality-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #1a1a2e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.item-subtype-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--lotro-parchment);
  background: #333;
  border: 1px solid #555;
}
.item-stat {
  display: inline-block;
  margin-right: 8px;
  font-size: 12px;
  white-space: nowrap;
}

/* Item detail modal — in-game tooltip style */
.item-modal-content {
  background: #0d1117;
  color: #d4cfc0;
  border: 1px solid #333;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.7);
  overflow: hidden;
}
#item-modal .modal-body {
  padding: 0;
}
/* Quality accent border at top */
#item-modal[data-quality="legendary"] .item-modal-content { border-top: 3px solid #ff9800; }
#item-modal[data-quality="incomparable"] .item-modal-content { border-top: 3px solid #e040fb; }
#item-modal[data-quality="rare"] .item-modal-content { border-top: 3px solid #3ea8e6; }
#item-modal[data-quality="uncommon"] .item-modal-content { border-top: 3px solid #f5e642; }
#item-modal[data-quality="common"] .item-modal-content { border-top: 3px solid #999; }

/* Close button floats over the tooltip */
.tt-close {
  position: absolute;
  top: 6px;
  right: 10px;
  color: #888;
  font-size: 22px;
  font-weight: 300;
  z-index: 2;
  opacity: 0.7;
  text-shadow: none;
}
.tt-close:hover { color: #ccc; opacity: 1; }

/* Tooltip wrapper */
.tt {
  padding: 14px 16px 12px;
  font-size: 14px;
  line-height: 1.5;
}

/* Header: icon + name */
.tt-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tt-icon .lotro-game-icon {
  width: 40px;
  height: 40px;
  border: 1px solid #555;
  border-radius: 3px;
  background: #1a1a2e;
}
.tt-name {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: #e0e0e0;
}

/* Quality colors on the name */
.tt-name.lotro-common { color: #f0f0f0; }
.tt-name.lotro-uncommon { color: #f5e642; }
.tt-name.lotro-rare { color: #3ea8e6; }
.tt-name.lotro-incomparable { color: #e040fb; }
.tt-name.lotro-legendary { color: #ff9800; }

/* Meta lines: binding, item level, slot */
.tt-line {
  font-size: 13px;
  color: #a0a0a0;
  margin-bottom: 2px;
}
.tt-binding {
  text-transform: capitalize;
}
.tt-ilvl {
  color: #c8b873;
}

/* Stats section */
.tt-stats {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #2a2a2a;
}
.tt-stat-row {
  font-size: 13px;
  color: #c8e6c9;
  padding: 1px 0;
}
.tt-stats-empty {
  font-size: 12px;
  color: #666;
  font-style: italic;
  padding: 2px 0;
}

/* Divider before cross-links */
.tt-divider {
  border-top: 1px solid #2a2a2a;
  margin: 8px 0;
}

/* Cross-link section within tooltip */
.tt-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tt-links .item-crosslink {
  font-size: 12px;
  padding: 2px 8px;
}

/* Keep modal narrow like a game tooltip */
#item-modal .modal-sm {
  width: 360px;
}
@media (max-width: 480px) {
  #item-modal .modal-sm { width: auto; margin: 10px; }
}

/* Game icons from LotRO Companion data */
.lotro-game-icon {
  display: inline-block;
  vertical-align: middle;
  border-radius: 2px;
  image-rendering: auto;
  width: auto;
  height: auto;
  flex-shrink: 0;
  background: var(--lotro-parchment);
  border: 1px solid var(--lotro-parchment-dark);
}
.lotro-item-link .lotro-game-icon {
  margin-right: 4px;
  margin-top: -2px;
}
.lotro-item .lotro-game-icon {
  margin-right: 3px;
}

/* Item modal meta paragraphs (deeds, virtues, etc.) */
.item-modal-meta p {
  margin-bottom: 4px;
}
.item-modal-header {
  border-bottom: 1px solid var(--lotro-gold);
}
.item-modal-header .modal-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.item-modal-header .close {
  color: var(--lotro-parchment);
  opacity: 0.7;
}

/* Cross-link badges in item table and modal */
.item-set-badge {
  display: inline-block;
  color: #fff;
  background: #9c27b0;
  border: 1px solid #7b1fa2;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 4px;
  transition: background-color 0.15s ease;
}
.item-set-badge:hover {
  background: #ad39c1;
  color: #fff;
  text-decoration: none;
}
.item-crosslink {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease;
}
.item-crosslink:hover {
  text-decoration: none;
}
.item-crosslink-set {
  color: #bb86fc;
  background: rgba(156, 39, 176, 0.12);
  border: 1px solid rgba(156, 39, 176, 0.3);
}
.item-crosslink-set:hover {
  background: rgba(156, 39, 176, 0.25);
  color: #d4a5ff;
}
.item-crosslink-deed {
  color: #66bb6a;
  background: rgba(76, 175, 80, 0.12);
  border: 1px solid rgba(76, 175, 80, 0.3);
}
.item-crosslink-deed:hover {
  background: rgba(76, 175, 80, 0.25);
  color: #a5d6a7;
}
.item-crosslink-virtue {
  color: #ffd54f;
  background: rgba(255, 213, 79, 0.12);
  border: 1px solid rgba(255, 213, 79, 0.3);
}
.item-crosslink-virtue:hover {
  background: rgba(255, 213, 79, 0.25);
  color: #fff176;
}
/* DataTables overrides for dark theme */
#items-table_wrapper .dataTables_filter input {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
}
#items-table_wrapper .dataTables_filter input:focus {
  border-color: var(--lotro-gold);
  outline: none;
}
#items-table_wrapper .dataTables_length select {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid #555;
}
#items-table_wrapper .dataTables_info {
  color: var(--lotro-text-light);
}
#items-table_wrapper .dataTables_paginate .paginate_button {
  color: var(--lotro-parchment) !important;
}
#items-table_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
  border-color: var(--lotro-gold) !important;
}

/* ─── LotRO Mob Auto-Links ──────────────────────────────────────────────── */
.lotro-mob {
  text-decoration: none;
  border-bottom: 1px dotted #9B2226;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  color: #e74c3c;
  transition: color 0.15s ease;
}
.lotro-mob:hover {
  text-decoration: none;
  color: #ff6b6b;
}
/* Tooltip on hover showing genus/species */
.lotro-mob[data-mob-genus]:hover::after {
  content: attr(data-mob-genus) ' — ' attr(data-mob-species);
  position: absolute;
  left: 0;
  bottom: 125%;
  background: #1a1a2e;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  pointer-events: none;
}
/* Small crosshair icon */
.lotro-mob::before {
  content: '\f05b';
  font-family: 'FontAwesome';
  font-size: 10px;
  margin-right: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.lotro-mob:hover::before {
  opacity: 0.6;
}

/* ─── Mob Database Page ─────────────────────────────────────────────────── */
.lotro-mob-link {
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  color: #e74c3c;
  transition: color 0.15s ease;
}
.lotro-mob-link:hover {
  text-decoration: underline;
  color: #ff6b6b;
}
.lotro-mob-name {
  font-family: 'Cinzel', serif;
  color: #e74c3c;
}
.mob-genus-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mob-species-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--lotro-parchment);
  background: #333;
  border: 1px solid #555;
}

#mobs-table {
  font-size: 14px;
}
#mobs-table thead th {
  background: var(--lotro-dark);
  color: var(--lotro-gold);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--lotro-gold);
}
#mobs-table tbody td {
  vertical-align: middle;
}
#mobs-table_wrapper .dataTables_filter input {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
}
#mobs-table_wrapper .dataTables_filter input:focus {
  border-color: var(--lotro-gold);
  outline: none;
}
#mobs-table_wrapper .dataTables_length select {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid #555;
}
#mobs-table_wrapper .dataTables_info {
  color: var(--lotro-text-light);
}
#mobs-table_wrapper .dataTables_paginate .paginate_button {
  color: var(--lotro-parchment) !important;
}
#mobs-table_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
  border-color: var(--lotro-gold) !important;
}

/* ─── Set Auto-Links ────────────────────────────────────────────────────── */
.lotro-set {
  text-decoration: none;
  border-bottom: 1px dotted #8e44ad;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  color: #bb86fc;
  transition: color 0.15s ease;
}
.lotro-set:hover {
  text-decoration: none;
  color: #d4a5ff;
}
.lotro-set::before {
  content: '\f1b3';
  font-family: 'FontAwesome';
  font-size: 10px;
  margin-right: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.lotro-set:hover::before {
  opacity: 0.6;
}

/* ─── Deed Auto-Links ───────────────────────────────────────────────────── */
.lotro-deed {
  text-decoration: none;
  border-bottom: 1px dotted #2e7d32;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  color: #66bb6a;
  transition: color 0.15s ease;
}
.lotro-deed:hover {
  text-decoration: none;
  color: #a5d6a7;
}
.lotro-deed::before {
  content: '\f02e';
  font-family: 'FontAwesome';
  font-size: 10px;
  margin-right: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.lotro-deed:hover::before {
  opacity: 0.6;
}

/* ─── Quest Auto-Links ──────────────────────────────────────────────────── */
.lotro-quest {
  text-decoration: none;
  border-bottom: 1px dotted #1e88e5;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  color: #64b5f6;
  transition: color 0.15s ease;
}
.lotro-quest:hover {
  text-decoration: none;
  color: #90caf9;
}
.lotro-quest::before {
  content: '\f02d';
  font-family: 'FontAwesome';
  font-size: 10px;
  margin-right: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.lotro-quest:hover::before {
  opacity: 0.6;
}

/* ─── Virtue Database Page ──────────────────────────────────────────────── */
#virtues-table {
  font-size: 14px;
}
#virtues-table thead th {
  background: var(--lotro-dark);
  color: var(--lotro-gold);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--lotro-gold);
}
#virtues-table tbody td {
  vertical-align: middle;
}
.lotro-virtue-link .lotro-game-icon {
  margin-right: 4px;
}
.lotro-virtue-name .lotro-game-icon,
#virtue-modal-title .lotro-game-icon {
  background: var(--lotro-dark-mid);
  border: 1px solid var(--lotro-dark-accent);
  margin-right: 6px;
}
.virtue-stat-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #2e7d32;
  border: 1px solid #43a047;
  margin: 1px 2px;
}
.virtue-rank-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--lotro-text);
  background: #c9a84c;
  border: 1px solid rgba(201, 168, 76, 0.3);
}
.virtue-passive-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #2196f3;
  border: 1px solid rgba(33, 150, 243, 0.3);
}
#virtues-table_wrapper .dataTables_filter input {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
}
#virtues-table_wrapper .dataTables_filter input:focus {
  border-color: var(--lotro-gold);
  outline: none;
}
#virtues-table_wrapper .dataTables_length select {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid #555;
}
#virtues-table_wrapper .dataTables_info {
  color: var(--lotro-text-light);
}
#virtues-table_wrapper .dataTables_paginate .paginate_button {
  color: var(--lotro-parchment) !important;
}
#virtues-table_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
  border-color: var(--lotro-gold) !important;
}

/* ─── Set Database Page ─────────────────────────────────────────────────── */
#sets-table {
  font-size: 14px;
}
#sets-table thead th {
  background: var(--lotro-dark);
  color: var(--lotro-gold);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--lotro-gold);
}
#sets-table tbody td {
  vertical-align: middle;
}
.set-bonus-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #9c27b0;
  border: 1px solid #7b1fa2;
  border: 1px solid rgba(156, 39, 176, 0.3);
  margin: 1px 2px;
}
.set-pieces-list {
  list-style: none;
  padding-left: 0;
}
.set-pieces-list li {
  padding: 4px 0;
  border-bottom: 1px solid #333;
}
.set-pieces-list li:last-child {
  border-bottom: none;
}
.set-pieces-list .lotro-game-icon {
  margin-right: 4px;
  vertical-align: middle;
  background: var(--lotro-dark-mid);
  border-color: var(--lotro-dark-accent);
}
.set-pieces-list .lotro-item-link {
  color: var(--lotro-parchment);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
}
.set-pieces-list .lotro-item-link:hover {
  color: var(--lotro-gold);
  border-bottom-color: var(--lotro-gold);
}
.set-bonus-table td {
  border-color: #333;
  padding: 4px 8px;
}
#sets-table_wrapper .dataTables_filter input {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
}
#sets-table_wrapper .dataTables_filter input:focus {
  border-color: var(--lotro-gold);
  outline: none;
}
#sets-table_wrapper .dataTables_length select {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid #555;
}
#sets-table_wrapper .dataTables_info {
  color: var(--lotro-text-light);
}
#sets-table_wrapper .dataTables_paginate .paginate_button {
  color: var(--lotro-parchment) !important;
}
#sets-table_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
  border-color: var(--lotro-gold) !important;
}

/* ─── Deed Database Page ────────────────────────────────────────────────── */
#deeds-table {
  font-size: 14px;
}
#deeds-table thead th {
  background: var(--lotro-dark);
  color: var(--lotro-gold);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--lotro-gold);
}
#deeds-table tbody td {
  vertical-align: middle;
}
.deed-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.deed-type-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  vertical-align: middle;
  border-radius: 2px;
}
.deed-type-slayer    { background: #c62828; }
.deed-type-exploration { background: #2e7d32; }
.deed-type-lore      { background: #6a1b9a; }
.deed-type-reputation { background: #1565c0; }
.deed-type-class     { background: #e65100; }
.deed-type-event     { background: #00838f; }
.deed-type-race      { background: #4e342e; }
.deed-type-other     { background: #616161; }
.deed-region-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--lotro-parchment);
  background: var(--lotro-green-light);
  border: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}
.deed-reward-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin: 1px 2px;
}
.deed-reward-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  vertical-align: middle;
}
.deed-reward-lp       { color: #1a1a2e; background: #ffd54f; border: 1px solid #f9c22e; }
.deed-reward-title    { color: #fff; background: #1565c0; border: 1px solid #0d47a1; }
.deed-reward-virtue   { color: #fff; background: #1a3a5c; border: 1px solid #2563a8; }
.deed-reward-virtue-xp { color: #e0f0ff; background: #1a3a5c; border: 1px solid #2563a8; }
.deed-reward-reputation { color: #fff; background: #7b1fa2; border: 1px solid #6a1b9a; }
.deed-reward-xp       { color: #1a1a2e; background: #fff176; border: 1px solid #fdd835; }
.deed-reward-item     { color: #fff; background: #00796b; border: 1px solid #00695c; }
.deed-reward-item .lotro-game-icon {
  background: #004d40;
  border-color: #00332b;
}
.deed-reward-rep      { color: #fff; background: #7b1fa2; border: 1px solid #6a1b9a; }
.deed-reward-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  vertical-align: middle;
}
.deed-objective-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 15px;
}
.deed-objective-list li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.deed-objective-list li:last-child {
  border-bottom: none;
}
.deed-objective-list li i {
  width: 18px;
  text-align: center;
  margin-right: 6px;
}
.deed-objective-list a {
  color: var(--lotro-gold);
  text-decoration: none;
}
.deed-objective-list a:hover {
  color: #fff;
  text-decoration: underline;
}
.deed-objective-list .lotro-game-icon {
  background: var(--lotro-dark-mid);
  border-color: var(--lotro-dark-accent);
}
#deeds-table_wrapper .dataTables_filter input {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
}
#deeds-table_wrapper .dataTables_filter input:focus {
  border-color: var(--lotro-gold);
  outline: none;
}
#deeds-table_wrapper .dataTables_length select {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid #555;
}
#deeds-table_wrapper .dataTables_info {
  color: var(--lotro-text-light);
}
#deeds-table_wrapper .dataTables_paginate .paginate_button {
  color: var(--lotro-parchment) !important;
}
#deeds-table_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
  border-color: var(--lotro-gold) !important;
}

/* Shared filter styles for database pages */
.db-filter-label {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--lotro-gold);
  display: block;
  margin-bottom: 4px;
}
.db-filter-select {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
}
.db-filter-select:focus {
  border-color: var(--lotro-gold);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.25);
}

/* Shared modal styles for database pages */
.db-modal-content {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
}
.db-modal-header {
  border-bottom: 1px solid var(--lotro-gold);
}
.db-modal-header .modal-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
}
.db-modal-header .close {
  color: var(--lotro-parchment);
  opacity: 0.7;
}

/* ─── Interactive Map ──────────────────────────────────────────────────────── */
.lotro-map-section {
  padding: 0;
}
.lotro-map-container {
  position: relative;
  padding: 0 10px;
}
.lotro-map {
  width: 100%;
  height: calc(100vh - 120px);
  min-height: 500px;
  background: #0a0a14;
  border: 1px solid #333;
  border-radius: 4px;
}
/* Smoother basemap upscaling when zoomed in */
.lotro-map .leaflet-image-layer {
  image-rendering: high-quality;
}

/* Large screens — maximise map area */
@media (min-width: 1200px) {
  .lotro-map-container {
    padding: 0 6px;
  }
  .lotro-map {
    height: calc(100vh - 100px);
    min-height: 650px;
  }
}
@media (min-width: 1600px) {
  .lotro-map-container {
    padding: 0 4px;
  }
  .lotro-map {
    height: calc(100vh - 90px);
    min-height: 750px;
  }
}
@media (min-width: 2000px) {
  .lotro-map {
    height: calc(100vh - 80px);
    min-height: 900px;
  }
}

/* Embed mode map sizing — full viewport */
.lotro-map-embed-mode .lotro-map {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

/* Toolbar */
.lotro-map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  flex-wrap: wrap;
  gap: 8px;
}
@media (min-width: 1200px) {
  .lotro-map-toolbar {
    padding: 5px 0;
  }
}
.lotro-map-toolbar-left,
.lotro-map-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lotro-map-toolbar-left > i {
  color: var(--lotro-gold);
  font-size: 18px;
}
.lotro-map-select {
  width: 300px;
  display: inline-block;
  background: var(--lotro-dark-mid);
  color: #fff;
  border: 1px solid var(--lotro-gold);
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  height: 36px;
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.2);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 0l6 6 6-6z' fill='%23C9A84C'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.lotro-map-select:focus {
  border-color: var(--lotro-gold-light);
  box-shadow: 0 0 6px rgba(201, 168, 76, 0.4);
  outline: none;
}
.lotro-map-select option {
  background: var(--lotro-dark-mid);
  color: #fff;
  padding: 4px 8px;
  font-weight: 400;
}
.lotro-map-select optgroup {
  background: var(--lotro-dark);
  color: var(--lotro-gold-light);
  font-style: normal;
  font-weight: 600;
}
.lotro-map-btn {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border-color: #444;
}
.lotro-map-btn:hover,
.lotro-map-btn:focus {
  background: var(--lotro-gold);
  color: var(--lotro-dark);
  border-color: var(--lotro-gold);
}
.lotro-map-btn:disabled {
  opacity: 0.4;
}
.lotro-map-marker-count {
  color: #999;
  font-size: 13px;
}

/* Category Filter Panel */
.lotro-map-category-panel {
  background: var(--lotro-dark);
  border: 1px solid #333;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 8px;
}
.lotro-map-category-grid {
  display: flex;
}

/* ─── Leaflet Region Selector Control ─────────────────────────────────────── */
.leaflet-control-region-selector {
  position: absolute !important;
  top: 5px !important;
  right: 10px !important;
  background: rgba(26, 26, 46, 0.95) !important;
  border: 1px solid var(--lotro-gold) !important;
  border-radius: 6px !important;
  padding: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  z-index: 1001 !important;
  min-width: 220px;
}

.leaflet-control-region-selector select {
  background: transparent !important;
  color: var(--lotro-parchment) !important;
  border: 1px solid var(--lotro-gold) !important;
  border-radius: 4px !important;
  outline: none !important;
  font-family: 'Cinzel', serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 6px 8px !important;
  width: 100% !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 0l6 6 6-6z' fill='%23C9A84C'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  padding-right: 24px !important;
  transition: border-color 0.15s ease !important;
}

.leaflet-control-region-selector select:hover {
  border-color: var(--lotro-gold-light) !important;
}

.leaflet-control-region-selector select:focus {
  border-color: var(--lotro-gold-light) !important;
  box-shadow: 0 0 6px rgba(201, 168, 76, 0.4) !important;
}

.leaflet-control-region-selector select option {
  background: var(--lotro-dark-mid) !important;
  color: var(--lotro-parchment) !important;
  padding: 4px 8px !important;
}

.leaflet-control-region-selector select optgroup {
  background: var(--lotro-dark) !important;
  color: var(--lotro-gold-light) !important;
  font-style: normal !important;
  font-weight: 600 !important;
}

/* In embed mode, position slightly differently */
.lotro-map-embed-mode .leaflet-control-region-selector {
  top: 15px !important;
  right: 15px !important;
}

.lotro-map-embed-mode .leaflet-control-region-selector select {
  font-size: 14px !important;
  padding: 8px 10px !important;
}

/* ─── Leaflet Share Control ───────────────────────────────────────────────── */
.leaflet-control-share {
  position: relative;
}
.leaflet-control-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(26, 26, 46, 0.95) !important;
  border: 1px solid var(--lotro-gold) !important;
  border-radius: 6px !important;
  color: var(--lotro-gold) !important;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.leaflet-control-share-btn:hover {
  background: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
}
.leaflet-control-share-toast {
  position: absolute;
  bottom: 44px;
  right: 0;
  background: var(--lotro-gold);
  color: var(--lotro-dark);
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.leaflet-control-share-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

  flex-wrap: wrap;
  gap: 16px;
}
.lotro-map-cat-group {
  min-width: 180px;
  flex: 1;
}
.lotro-map-cat-group-title {
  font-family: 'Cinzel', serif;
  color: var(--lotro-gold);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
}
.lotro-map-cat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--lotro-parchment);
  font-size: 13px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.15s;
}
.lotro-map-cat-item:hover {
  color: var(--lotro-gold);
  background: rgba(201, 168, 76, 0.1);
}
.lotro-map-cat-item input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}
.lotro-map-cat-item img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  image-rendering: auto;
}
.lotro-map-category-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #333;
}
.lotro-map-category-actions .btn {
  margin-right: 6px;
}

/* Loading Overlay */
.lotro-map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  pointer-events: none;
}
.lotro-map-loading-inner {
  text-align: center;
  color: var(--lotro-gold);
}
.lotro-map-loading-inner p {
  margin-top: 10px;
  font-family: 'Cinzel', serif;
  font-size: 14px;
}

/* Map Popups */
.lotro-map-popup {
  min-width: 180px;
  max-width: 260px;
}
.lotro-map-popup-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.lotro-map-popup-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  image-rendering: auto;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px;
}
.lotro-map-popup-header-text {
  flex: 1;
  min-width: 0;
}
.lotro-map-popup-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--lotro-gold);
  line-height: 1.2;
  margin: 0 0 8px;
}
.lotro-map-popup-cat {
  font-size: 11px;
  color: #777;
  line-height: 1.3;
}
.lotro-map-popup-npc-title {
  font-size: 11px;
  color: #999;
  font-style: italic;
  line-height: 1.3;
}
.lotro-map-popup-details {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
  border-top: 1px solid #e0e0e0;
}
.lotro-map-popup-details li {
  padding: 3px 0;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lotro-map-popup-details li:last-child {
  border-bottom: none;
}
.lotro-map-popup-details li i {
  width: 14px;
  text-align: center;
  margin-right: 4px;
  font-size: 11px;
}
.lotro-map-popup-details li a {
  color: var(--lotro-dark-accent);
  text-decoration: none;
}
.lotro-map-popup-details li a:hover {
  color: var(--lotro-gold);
  text-decoration: underline;
}
.lotro-popup-quest-bestower {
  color: #DAA520;
}
.lotro-popup-more {
  color: #aaa;
  font-style: italic;
  font-size: 11px;
}
.lotro-map-popup-coords {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #f0f0f0;
}

/* Map popup action buttons */
.lotro-map-popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lotro-map-share-btn,
.lotro-map-embed-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid var(--lotro-gold);
  border-radius: 4px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.lotro-map-share-btn:hover,
.lotro-map-embed-btn:hover {
  background: var(--lotro-gold);
  color: var(--lotro-dark);
  text-decoration: none;
}

.lotro-map-share-btn.lotro-map-share-copied {
  background: var(--lotro-green);
  color: #fff;
  border-color: var(--lotro-green);
}

.lotro-map-embed-btn.lotro-map-embed-copied {
  background: var(--lotro-green);
  color: #fff;
  border-color: var(--lotro-green);
}
.lotro-map-popup-link .lotro-map-nav-btn {
  margin-top: 6px;
  width: 100%;
}
.lotro-map-area-link-icon {
  width: 32px !important;
  height: 32px !important;
  border: 2px solid var(--lotro-gold);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  image-rendering: auto;
}
.lotro-map-area-link-thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--lotro-gold);
  border-radius: 4px;
  margin: 0 auto 6px;
  image-rendering: auto;
}

/* Leaflet Popup Content Styling */
.leaflet-popup-content-wrapper {
  background: rgba(26, 26, 46, 0.95) !important;
  border: 1px solid var(--lotro-gold) !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-popup-content {
  margin: 12px !important;
  font-size: 13px !important;
  color: var(--lotro-parchment) !important;
  font-family: 'Crimson Text', Georgia, serif !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  background: rgba(26, 26, 46, 0.95) !important;
  border: 1px solid var(--lotro-gold) !important;
  border-top: none !important;
  border-right: none !important;
}

.leaflet-popup-close-button {
  color: var(--lotro-parchment) !important;
  font-size: 18px !important;
  font-weight: bold !important;
  padding: 4px 8px !important;
}

.leaflet-popup-close-button:hover {
  color: var(--lotro-gold) !important;
  background: none !important;
}

/* Navigation Link Icons on Map */
.lotro-map-link-icon {
  color: var(--lotro-gold);
  font-size: 22px;
  text-shadow: 0 0 6px rgba(0,0,0,0.8);
  background: none;
  border: none;
}
.lotro-map-link-icon:hover {
  color: #fff;
}

/* Leaflet cluster overrides */
.lotro-cluster {
  background: rgba(201, 168, 76, 0.3);
}
.lotro-cluster div {
  background: rgba(201, 168, 76, 0.7);
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  margin: 3px;
}

/* Leaflet tile/background override for dark theme */
.lotro-map .leaflet-container {
  background: #0a0a14;
}

/* Responsive */
@media (max-width: 767px) {
  .lotro-map {
    height: calc(100vh - 200px);
    min-height: 400px;
  }
  .lotro-map-select {
    width: 100%;
    max-width: 260px;
  }
  .lotro-map-category-grid {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Quest Database Page
   ═══════════════════════════════════════════════════════════════════════════ */

.quest-category-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #1976d2;
  border: 1px solid #1565c0;
}
.quest-group-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #1a1a2e;
  background: #ff9800;
  border: 1px solid #f57c00;
  vertical-align: middle;
  margin-left: 4px;
}
.quest-repeat-badge {
  color: #fff;
  background: #4caf50;
  border: 1px solid #388e3c;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 3px;
  vertical-align: middle;
}
.quest-instance-badge {
  color: #fff;
  background: #9c27b0;
  border: 1px solid #7b1fa2;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 3px;
  vertical-align: middle;
}
.quest-level-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
  background: #ffd54f;
  border: 1px solid #f9c22e;
  margin-left: 8px;
}
.lotro-quest-name {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  color: var(--lotro-gold);
}
.quest-modal-meta p {
  margin: 4px 0;
  font-size: 14px;
}
.quest-modal-desc {
  margin: 15px 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.15);
  border-left: 3px solid var(--lotro-gold);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: #ccc;
}
.quest-modal-chain {
  margin: 15px 0;
}
.quest-modal-chain h5,
.quest-modal-rewards h5 {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--lotro-gold-light);
  margin-bottom: 8px;
}
.quest-modal-chain a {
  color: #90caf9;
}
.quest-modal-chain a:hover {
  color: #bbdefb;
  text-decoration: underline;
}
.quest-modal-rewards {
  margin: 15px 0;
}
.quest-reward-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.quest-reward-list li {
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.quest-reward-list li:last-child {
  border-bottom: none;
}
.quest-reward-list a {
  color: var(--lotro-gold);
  text-decoration: none;
}
.quest-reward-list a:hover {
  color: #fff;
  text-decoration: underline;
}
.quest-reward-list .lotro-game-icon,
.deed-reward-list .lotro-game-icon {
  background: var(--lotro-dark-mid);
  border-color: var(--lotro-dark-accent);
}
.quest-reward-list strong {
  color: var(--lotro-gold-light);
}

/* Deed modal reward list */
.deed-reward-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 15px;
}
.deed-reward-list li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.deed-reward-list li:last-child {
  border-bottom: none;
}
.deed-reward-list strong {
  color: var(--lotro-gold-light);
}
.quest-reward-list strong {
  color: var(--lotro-gold-light);
}

/* Quest table styling */
#quests-table_wrapper .dataTables_filter input {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
}
#quests-table_wrapper .dataTables_filter input:focus {
  border-color: var(--lotro-gold);
  outline: none;
}
#quests-table_wrapper .dataTables_length select {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid #555;
}
#quests-table_wrapper .dataTables_info {
  color: var(--lotro-text-light);
}
#quests-table_wrapper .dataTables_paginate .paginate_button {
  color: var(--lotro-parchment) !important;
}
#quests-table_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
  border-color: var(--lotro-gold) !important;
}

/* ── Quest Overlay on Map ───────────────────────────────────────────────── */

.lotro-map-quest-panel {
  position: absolute;
  top: 80px;
  right: 10px;
  z-index: 1001;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid var(--lotro-gold);
  border-radius: 6px;
  padding: 12px;
  margin-right: 10px;
  max-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--lotro-parchment);
}
.lotro-map-quest-panel h5 {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--lotro-gold);
  margin: 0 0 8px;
}
.lotro-map-quest-panel .quest-step {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lotro-map-quest-panel .quest-step:last-child {
  border-bottom: none;
}
.lotro-map-quest-panel .quest-step-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  background: var(--lotro-gold);
  color: var(--lotro-dark);
  font-weight: 700;
  font-size: 11px;
  margin-right: 6px;
}
/* On-map objective — click to pan */
.lotro-map-quest-panel .quest-step-onmap {
  cursor: pointer;
  transition: opacity 0.15s;
}
.lotro-map-quest-panel .quest-step-onmap:hover {
  opacity: 0.8;
}
/* Off-map objective — click to switch maps */
.lotro-map-quest-panel .quest-step-offmap {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.lotro-map-quest-panel .quest-step-offmap:hover {
  opacity: 1;
}
.lotro-map-quest-panel .quest-step-num-offmap {
  background: #555;
}
.lotro-map-quest-panel .quest-step-map-hint {
  display: block;
  font-size: 10px;
  margin-left: 26px;
  margin-top: 2px;
  color: var(--lotro-gold);
  opacity: 0.8;
}
.lotro-map-quest-panel .close-panel {
  float: right;
  cursor: pointer;
  color: #999;
  font-size: 16px;
}
.lotro-map-quest-panel .close-panel:hover {
  color: #fff;
}

/* Quest objective markers on map */
.quest-objective-icon {
  background: var(--lotro-gold);
  color: var(--lotro-dark);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
/* Kill-zone objective marker (red highlight) */
.quest-kill-icon {
  background: #e74c3c;
  color: #fff;
  border-color: #c0392b;
}
/* Kill badge in quest panel */
.quest-kill-badge {
  display: inline-block;
  font-size: 10px;
  color: #e74c3c;
  margin-left: 4px;
  opacity: 0.9;
}
/* Kill objective number badge in panel */
.lotro-map-quest-panel .quest-step-num-kill {
  background: #e74c3c;
  color: #fff;
}

/* Deed overlay panel and markers */
.lotro-map-deed-panel {
  position: absolute;
  top: 80px;
  right: 10px;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid var(--lotro-gold);
  border-radius: 6px;
  z-index: 1000;
  padding: 12px;
  margin-right: 10px;
  max-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--lotro-parchment);
}
.lotro-map-deed-panel h5 {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--lotro-gold);
  margin: 0 0 8px;
}
.lotro-map-deed-panel .deed-objective-step {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.lotro-map-deed-panel .deed-objective-step:last-child {
  border-bottom: none;
}
.lotro-map-deed-panel .deed-step-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  background: #9c27b0;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  margin-right: 6px;
}
/* On-map deed objective — click to pan */
.lotro-map-deed-panel .deed-objective-onmap {
  cursor: pointer;
  transition: opacity 0.15s;
}
.lotro-map-deed-panel .deed-objective-onmap:hover {
  opacity: 0.8;
}
.lotro-map-deed-panel .close-panel {
  float: right;
  cursor: pointer;
  color: #999;
  font-size: 16px;
}
.lotro-map-deed-panel .close-panel:hover {
  color: #fff;
}

/* Off-map objective — clickable to switch maps */
.lotro-map-deed-panel .deed-objective-offmap {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.lotro-map-deed-panel .deed-objective-offmap:hover {
  opacity: 1;
}
.lotro-map-deed-panel .deed-step-num-offmap {
  background: #555;
}
.lotro-map-deed-panel .deed-objective-map-hint {
  display: block;
  font-size: 10px;
  margin-left: 26px;
  margin-top: 2px;
  color: var(--lotro-gold);
  opacity: 0.8;
}

/* Deed objective markers on map */
.deed-objective-icon {
  background: #9c27b0;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* (Quest popup styles are now integrated into .lotro-map-popup-details above) */

/* ─── Instance Loot Accordion ───────────────────────────────────────────── */
.lotro-loot-accordion {
  margin: 20px 0;
}

.lotro-loot-boss {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.lotro-loot-boss[open] {
  border-color: #ccc;
}

.lotro-loot-boss-name {
  display: block;
  padding: 10px 15px;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  color: #333;
  background: #f5f5f5;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  list-style: none;
  position: relative;
  transition: background 0.15s ease;
}

.lotro-loot-boss[open] > .lotro-loot-boss-name {
  border-bottom-color: #ddd;
}

.lotro-loot-boss-name::-webkit-details-marker {
  display: none;
}

.lotro-loot-boss-name::after {
  content: '\f078';
  font-family: 'FontAwesome';
  font-size: 12px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  color: #666;
}

.lotro-loot-boss[open] > .lotro-loot-boss-name::after {
  transform: translateY(-50%) rotate(180deg);
}

.lotro-loot-boss-name:hover {
  background: #e8e8e8;
}

.lotro-loot-boss-name a.lotro-mob {
  color: #333;
  text-decoration: none;
  border-bottom: 1px dotted #999;
}

.lotro-loot-boss-name a.lotro-mob:hover {
  color: var(--lotro-dark-accent);
}

.lotro-loot-chest {
  padding: 10px 15px 14px;
  border-top: 1px solid #eee;
}

.lotro-loot-chest:first-child {
  border-top: none;
}

.lotro-loot-chest-label {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--lotro-text);
  margin: 0 0 8px 0;
  padding: 0;
}

.lotro-loot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.lotro-loot-table thead th {
  text-align: left;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--lotro-gold);
  background: var(--lotro-dark);
  padding: 8px 10px;
}

.lotro-loot-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--lotro-parchment-dark);
  vertical-align: middle;
  overflow: visible;
  position: relative;
}

.lotro-loot-table tbody tr:nth-child(even) {
  background: var(--lotro-parchment);
}

.lotro-loot-table tbody tr:hover {
  background: var(--lotro-parchment-dark);
}

.lotro-loot-table tbody tr:last-child td {
  border-bottom: none;
}

.lotro-drop-chance {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
}

.lotro-drop-guaranteed {
  color: #3c763d;
  background: #dff0d8;
}

.lotro-drop-common {
  color: #555;
  background: #f0f0f0;
}

.lotro-drop-uncommon {
  color: #8a6d3b;
  background: #fcf8e3;
}

.lotro-drop-rare {
  color: #31708f;
  background: #d9edf7;
}

/* ─── Editor Page ───────────────────────────────────────────────────── */
#login-section {
  text-align: center;
  padding: 60px 0;
}
.editor-login-section {
  text-align: center;
  padding: 60px 0;
}
.editor-login-section h2 {
  font-family: 'Cinzel', serif;
  margin-bottom: 12px;
}
.editor-login-error {
  color: #c62828;
  margin-top: 12px;
  font-size: 13px;
}
.editor-access-request {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.editor-access-request h4 {
  font-family: 'Cinzel', serif;
  margin-bottom: 8px;
}
.editor-access-request p {
  color: #666;
  margin-bottom: 16px;
  font-size: 14px;
}
.editor-access-request iframe {
  border-radius: 4px;
  background: #fafafa;
}
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}
.editor-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.editor-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.editor-tabs {
  list-style: none;
  display: flex;
  gap: 0;
  padding: 0;
  margin: 0 0 20px;
  border-bottom: 2px solid #e0e0e0;
}
.editor-tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #777;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.editor-tab:hover {
  color: #333;
}
.editor-tab.active {
  color: #333;
  border-bottom-color: #337ab7;
}
.editor-tab i {
  margin-right: 4px;
}
.editor-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.editor-panel-header h3 {
  margin: 0;
  font-size: 18px;
}
.editor-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.editor-article-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.1s;
}
.editor-article-item:hover {
  background: #f8f8f8;
}
.editor-article-cat {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  color: #fff;
  flex-shrink: 0;
}
.badge-guides { background: #2e7d32; }
.badge-news { background: #1565c0; }
.editor-article-title {
  flex: 1;
  font-weight: 500;
}
.editor-article-date {
  color: #999;
  flex-shrink: 0;
}
.editor-frontmatter {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 0;
}
/* Image picker */
.fm-image-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fm-image-preview {
  width: 100%;
  height: 80px;
  border: 1px dashed #ccc;
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.fm-image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 3px;
}
.fm-image-placeholder {
  color: #aaa;
  font-size: 13px;
}
.fm-image-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fm-image-browse-btn {
  cursor: pointer;
  margin: 0;
}
.fm-image-status {
  font-size: 12px;
  color: #777;
}
.fm-image-status.error {
  color: #d9534f;
}
/* Save Changes bar */
.save-changes-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
  margin: 10px 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s, max-height 0.25s, margin 0.25s, padding 0.25s;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
}
.save-changes-bar.visible {
  opacity: 1;
  max-height: 60px;
  padding: 8px 14px;
  margin: 10px 0;
}
.save-changes-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.save-changes-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.save-changes-label {
  font-weight: 600;
  color: #92400e;
}
.save-changes-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.draft-status {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}
.draft-status.draft-error {
  color: #dc2626;
}
.editor-milkdown-container {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}
/* ProseMirror toolbar */
.pm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid #e0e0e0;
  background: #f5f5f5;
  border-radius: 4px 4px 0 0;
}
.pm-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.pm-toolbar button:hover {
  background: #e8e8e8;
  border-color: #ccc;
  color: #333;
}
.pm-toolbar button.active {
  background: #d0e5f7;
  border-color: #a0c4e8;
  color: #1565c0;
}
.pm-toolbar button i {
  font-size: 14px;
}
.pm-toolbar-sep {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: #ddd;
  margin: 0 4px;
}
/* ProseMirror content area */
.pm-editor-content {
  flex: 1;
  min-height: 350px;
  overflow-y: auto;
}
.pm-editor-content .ProseMirror {
  padding: 16px 20px;
  min-height: 350px;
  outline: none;
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}
.pm-editor-content .ProseMirror h1 { font-size: 1.8em; margin: 1em 0 0.4em; font-weight: 700; }
.pm-editor-content .ProseMirror h2 { font-size: 1.4em; margin: 0.9em 0 0.3em; font-weight: 600; }
.pm-editor-content .ProseMirror h3 { font-size: 1.2em; margin: 0.8em 0 0.3em; font-weight: 600; }
.pm-editor-content .ProseMirror p { margin: 0 0 0.8em; }
.pm-editor-content .ProseMirror ul, .pm-editor-content .ProseMirror ol { padding-left: 1.6em; margin: 0 0 0.8em; }
.pm-editor-content .ProseMirror blockquote {
  border-left: 3px solid #ccc;
  padding-left: 16px;
  margin-left: 0;
  color: #666;
}
.pm-editor-content .ProseMirror pre {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  overflow-x: auto;
}
.pm-editor-content .ProseMirror code {
  background: #f0f0f0;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}
.pm-editor-content .ProseMirror pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}
.pm-editor-content .ProseMirror hr {
  border: none;
  border-top: 2px solid #e0e0e0;
  margin: 1.5em 0;
}
.pm-editor-content .ProseMirror img {
  max-width: 100%;
  border-radius: 4px;
}
.pm-editor-content .ProseMirror a {
  color: #337ab7;
  text-decoration: underline;
}
/* Widget node views */
.pm-widget {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0;
  padding: 14px 16px;
  border: 2px dashed #c0d0e0;
  border-radius: 6px;
  background: #f7fafd;
  user-select: none;
  cursor: default;
  transition: border-color 0.15s;
}
.pm-widget:hover {
  border-color: #89b0d0;
}
.ProseMirror-selectednode .pm-widget,
.pm-widget.ProseMirror-selectednode {
  border-color: #337ab7;
  box-shadow: 0 0 0 3px rgba(51,122,183,0.15);
}
.pm-widget-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #337ab7;
}
.pm-widget-badge i {
  font-size: 14px;
}
.pm-widget-info {
  font-size: 12px;
  color: #777;
}
.pm-widget-map-preview {
  width: 100%;
  height: 150px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 6px;
  pointer-events: none;
}
.pm-widget-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 12px;
}
.pm-widget-table th,
.pm-widget-table td {
  border: 1px solid #ddd;
  padding: 4px 8px;
  text-align: left;
}
.pm-widget-table th {
  background: #f5f5f5;
  font-weight: 600;
}
.pm-widget-table tr:nth-child(even) {
  background: #fafafa;
}
/* Consumable modal checklist */
.consumable-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  max-height: 260px;
  overflow-y: auto;
  padding: 8px 0;
}
.consumable-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
}
.consumable-check-item:hover {
  background: #f0f0f0;
}
.consumable-check-item input[type="checkbox"] {
  margin: 0;
}
#consumable-preview {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
  margin-top: 8px;
  background: #fafafa;
}
#consumable-preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#consumable-preview th,
#consumable-preview td {
  border: 1px solid #ddd;
  padding: 4px 8px;
  text-align: left;
}
#consumable-preview th {
  background: #f0f0f0;
  font-weight: 600;
}
/* Config editor */
.editor-config-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.1s, border-color 0.15s;
}
.editor-config-item:hover {
  background: #f8f8f8;
  border-color: #ccc;
}
.editor-config-item i {
  font-size: 18px;
  color: #666;
}
.editor-config-item-label {
  font-weight: 600;
  flex: 1;
}
.editor-config-edit-label {
  font-weight: 600;
  font-size: 15px;
  margin-left: 12px;
  flex: 1;
}
.editor-json-textarea {
  width: 100%;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  padding: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fafafa;
  color: #333;
  resize: vertical;
  tab-size: 2;
}
.editor-json-textarea:focus {
  border-color: #337ab7;
  outline: none;
  background: #fff;
}
.editor-json-error {
  color: #c62828;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', monospace;
}

/* ─── Widget Dropdown ────────────────────────────────────── */
.editor-panel-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.editor-widget-dropdown {
  position: relative;
  display: inline-block;
}
.pm-toolbar-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.pm-toolbar-dropdown > button {
  gap: 4px;
}
.editor-widget-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 200px;
  margin-top: 2px;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  list-style: none;
}
.editor-widget-menu.open {
  display: block;
}
.editor-widget-menu li {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.editor-widget-menu li:hover {
  background: #f0f0f0;
}
.editor-widget-menu li i {
  margin-right: 6px;
  width: 16px;
  text-align: center;
}

/* ─── Widget Modal ───────────────────────────────────────── */
.widget-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.widget-modal {
  background: #fff;
  border-radius: 6px;
  width: 90%;
  max-width: 780px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.widget-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}
.widget-modal-header h4 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 16px;
}
.widget-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.widget-modal-close:hover {
  color: #333;
}
.widget-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.widget-modal-body h5 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
}
.widget-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid #e0e0e0;
}

/* ─── DPS Row Editor ─────────────────────────────────────── */
.dps-row-editor {
  margin-bottom: 6px;
}
.dps-row-editor .btn-danger {
  padding: 4px 8px;
}
.dps-table-preview {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
}
.dps-table-preview table {
  margin-bottom: 0;
  font-size: 13px;
}
.dps-table-preview small {
  display: block;
  margin-bottom: 6px;
}

/* ─── Quest / Deed Lookup Results ────────────────────── */
.lookup-results {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fafafa;
}
.lookup-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.1s ease;
}
.lookup-result:last-child { border-bottom: none; }
.lookup-result:hover { background: #e8f4fd; }
.lookup-result.active { background: #d0ebfa; font-weight: 600; }
.lookup-result-name {
  font-size: 14px;
  color: #333;
}
.lookup-result-meta {
  font-size: 12px;
  color: #888;
  margin-left: 12px;
  white-space: nowrap;
}
.lookup-selected {
  margin-top: 10px;
  padding: 8px 12px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 4px;
  font-size: 14px;
}

/* ── Connection status & toolbar right ──────────────── */
.editor-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.workspace-status {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}
.workspace-status.connected {
  color: #3c763d;
}

/* ── Save toast ─────────────────────────────────────── */
.save-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 20px;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  z-index: 10001;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: opacity 0.3s;
}
.save-toast.save-toast-success {
  background: #3c763d;
}
.save-toast.save-toast-error {
  background: #a94442;
}

/* ── Map embed ──────────────────────────────────────── */
.lotro-map-embed {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0;
}

/* Embed mode: hide site chrome when map is loaded in an iframe */
.lotro-map-embed-mode,
.lotro-map-embed-mode html {
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
}
.lotro-map-embed-mode body,
body.lotro-map-embed-mode {
  margin: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
  overflow: hidden !important;
  scroll-behavior: auto !important;
}
/* Override any fixed-header padding in embed mode */
.lotro-map-embed-mode .fixed-header,
.lotro-map-embed-mode.fixed-header {
  padding-top: 0 !important;
}
.lotro-map-embed-mode .search-open.search-active,
.lotro-map-embed-mode.search-open.search-active {
  padding-top: 0 !important;
}
.lotro-map-embed-mode #header,
.lotro-map-embed-mode #footer,
.lotro-map-embed-mode .breadcrumbs {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: static !important;
}
.lotro-map-embed-mode .lotro-map-section {
  padding: 0 !important;
  margin: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
  overflow: hidden !important;
}
.lotro-map-embed-mode .lotro-map-container {
  padding: 0 !important;
  margin: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
  overflow: hidden !important;
  position: relative;
}
.lotro-map-embed-mode #lotro-map {
  height: 100vh !important;
  width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Instance Database Page
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Instance Listing Table ──────────────────────────────────────────── */
.lotro-instance-link {
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  color: #e67e22;
  transition: color 0.15s ease;
}
.lotro-instance-link:hover {
  text-decoration: underline;
  color: #f39c12;
}
.instance-group-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.instance-tier-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--lotro-parchment);
  background: #333;
  border: 1px solid #555;
}

#instances-table {
  font-size: 14px;
}
#instances-table thead th {
  background: var(--lotro-dark);
  color: var(--lotro-gold);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--lotro-gold);
}
#instances-table tbody td {
  vertical-align: middle;
}
#instances-table_wrapper .dataTables_filter input {
  background: var(--lotro-dark);
  color: var(--lotro-parchment);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
}
#instances-table_wrapper .dataTables_filter input:focus {
  border-color: var(--lotro-gold);
  outline: none;
}
#instances-table_wrapper .dataTables_length select {
  background: var(--lotro-dark-mid);
  color: var(--lotro-parchment);
  border: 1px solid #555;
}
#instances-table_wrapper .dataTables_info {
  color: var(--lotro-text-light);
}
#instances-table_wrapper .dataTables_paginate .paginate_button {
  color: var(--lotro-parchment) !important;
}
#instances-table_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--lotro-gold) !important;
  color: var(--lotro-dark) !important;
  border-color: var(--lotro-gold) !important;
}

/* ─── Instance Detail Page ────────────────────────────────────────────── */
.instance-info-card {
  background: var(--lotro-dark-mid, #1a1a2e);
  border: 1px solid #444;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}
.instance-meta-table {
  margin-bottom: 0;
}
.instance-meta-table th {
  width: 180px;
  color: var(--lotro-gold);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  border-top: none;
  padding: 8px 12px;
}
.instance-meta-table td {
  color: var(--lotro-parchment);
  border-top: none;
  padding: 8px 12px;
}
.instance-meta-table tr + tr th,
.instance-meta-table tr + tr td {
  border-top: 1px solid #333;
}

.instance-section-title {
  font-family: 'Cinzel', serif;
  color: var(--lotro-gold);
  font-size: 20px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #444;
}
.instance-section-title i {
  margin-right: 8px;
  opacity: 0.7;
}

.instance-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

/* ─── Related Content Cards (guides + videos) ─────────────────────────── */
.rc-section { margin-bottom: 20px; }
.rc-section-title {
  font-size: 16px;
  color: var(--lotro-parchment, #d4c4a0);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.rc-section-title i { margin-right: 6px; opacity: 0.7; }
.rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.rc-card {
  display: flex;
  flex-direction: column;
  background: var(--lotro-dark-mid, #1a1a2e);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rc-card:hover {
  border-color: var(--lotro-gold, #c8a84e);
  box-shadow: 0 2px 12px rgba(200,168,78,0.15);
  text-decoration: none;
  color: inherit;
}
.rc-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.rc-card-body {
  padding: 10px 12px;
  flex: 1;
}
.rc-card-title {
  font-size: 14px;
  margin: 0 0 4px;
  color: var(--lotro-parchment, #d4c4a0);
  line-height: 1.3;
}
.rc-card-excerpt {
  font-size: 12px;
  color: #999;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-card-channel {
  font-size: 11px;
  color: #888;
}
.rc-thumb-wrap {
  position: relative;
}
.rc-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(0,0,0,0.65);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  pointer-events: none;
  transition: background 0.2s;
}
.rc-card:hover .rc-play-btn {
  background: rgba(230,33,23,0.85);
}

/* ─── Mob Accordion (uses lotro-loot-boss <details> pattern) ───────────── */
.instance-mob-boss .lotro-loot-boss-name {
  color: var(--lotro-parchment);
  background: var(--lotro-dark-mid, #1a1a2e);
}

.instance-mob-boss {
  background: var(--lotro-dark-mid, #1a1a2e);
  border-color: #444;
}

.instance-mob-boss[open] {
  border-color: #555;
}

.instance-mob-boss[open] > .lotro-loot-boss-name {
  border-bottom-color: #333;
  color: var(--lotro-gold);
}

.instance-mob-boss .lotro-loot-boss-name:hover {
  background: rgba(255, 255, 255, 0.05);
}

.instance-mob-boss .lotro-loot-boss-name::after {
  color: #888;
}

.instance-mob-meta {
  float: right;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #999;
  margin-top: 2px;
}

.instance-mob-boss .lotro-loot-chest {
  border-top-color: #333;
}

.instance-ability-table thead th {
  background: var(--lotro-dark);
  color: var(--lotro-gold);
}

.instance-ability-table tbody td {
  color: var(--lotro-parchment);
  border-bottom-color: #333;
  vertical-align: top;
  padding: 8px 10px;
}

.instance-ability-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.instance-ability-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* Skill icon */
.skill-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Skill name + badges layout */
.skill-name-cell {
  white-space: nowrap;
  width: 1%;
  font-weight: 500;
}

.skill-badges {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.skill-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.skill-badge-atk {
  background: rgba(212, 175, 55, 0.15);
  color: var(--lotro-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.skill-badge-range {
  background: rgba(100, 180, 255, 0.12);
  color: #7ec8e3;
  border: 1px solid rgba(100, 180, 255, 0.25);
}

.skill-badge-aoe {
  background: rgba(255, 140, 50, 0.12);
  color: #f0a050;
  border: 1px solid rgba(255, 140, 50, 0.25);
}

.skill-badge-cd {
  background: rgba(160, 160, 160, 0.12);
  color: #aaa;
  border: 1px solid rgba(160, 160, 160, 0.25);
}

.skill-badge-ind {
  background: rgba(180, 130, 255, 0.12);
  color: #c4a0ff;
  border: 1px solid rgba(180, 130, 255, 0.25);
}

/* Effects column */

/* ── GitHub Device Flow Modal ───────────────────────── */
.gh-device-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gh-device-dialog {
  background: #2b2b2b;
  color: #e8e8e8;
  border-radius: 8px;
  padding: 28px 32px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.gh-device-dialog h4 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #fff;
}
.gh-device-dialog h4 .fa { margin-right: 6px; }
.gh-device-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 4px;
  background: #1a1a1a;
  border: 2px solid #444;
  border-radius: 6px;
  padding: 12px 20px;
  margin: 16px 0;
  color: #fff;
  user-select: all;
}
.gh-device-status {
  margin-top: 16px;
  font-size: 13px;
  color: #aaa;
}
.gh-device-status .fa-check-circle { color: #3c763d; }
.gh-device-status .fa-times-circle { color: #a94442; }

/* ── Copy Link Button ────────────────────────────────────────────── */
.copy-link-btn { transition: background .15s, color .15s; }
.copy-link-copied,
.copy-link-copied:hover,
.copy-link-copied:focus {
  background: #3c763d;
  border-color: #3c763d;
  color: #fff;
}

/* ── Quest & Deed Embed Cards ────────────────────────────────────── */
.lotro-card {
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
  background: #1e1e1e;
  font-size: 14px;
  line-height: 1.5;
}
.lotro-card-quest { border-left: 4px solid #c9aa58; }
.lotro-card-deed  { border-left: 4px solid #5b9bd5; }
.lotro-card-missing {
  color: #a94442;
  border-left-color: #a94442;
  font-style: italic;
}
.lotro-card-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: 'Cinzel', serif;
}
.lotro-card-header a { color: #c9aa58; text-decoration: none; }
.lotro-card-header a:hover { color: #e0c872; text-decoration: underline; }
.lotro-card-deed .lotro-card-header a { color: #5b9bd5; }
.lotro-card-deed .lotro-card-header a:hover { color: #7bb8e8; }
.lotro-card-level {
  display: inline-block;
  background: #333;
  color: #ddd;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  font-family: 'Roboto', sans-serif;
}
.lotro-card-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}
.lotro-card-meta > span { margin-right: 12px; }
.lotro-card-meta .fa { margin-right: 3px; }
.lotro-card-deed-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  font-family: 'Roboto', sans-serif;
  background: #333;
  color: #ccc;
}
.lotro-card-deed-type-slayer     { background: #5c2020; color: #f0a0a0; }
.lotro-card-deed-type-exploration{ background: #1e4d2e; color: #8fd4a4; }
.lotro-card-deed-type-lore       { background: #3b2e5a; color: #c4a8e8; }
.lotro-card-deed-type-reputation { background: #4a3b1e; color: #d4b06a; }
.lotro-card-deed-type-class      { background: #1e3a5a; color: #8ec2e8; }
.lotro-card-deed-type-event      { background: #5a4a1e; color: #e8d88e; }
.lotro-card-deed-type-race       { background: #3a3a1e; color: #c8c88e; }
.lotro-card-desc {
  color: #bbb;
  margin-bottom: 8px;
}
.lotro-card-bestower {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}
.lotro-card-objectives {
  font-size: 13px;
  color: #bbb;
  margin-bottom: 8px;
}
.lotro-card-objectives ul {
  margin: 4px 0 0 0;
  padding-left: 20px;
}
.lotro-card-objectives li { margin-bottom: 2px; }
.lotro-card-more { color: #888; font-style: italic; }
.lotro-card-rewards {
  font-size: 13px;
  color: #aaa;
  padding-top: 8px;
  border-top: 1px solid #333;
}
.lotro-card-rewards span { margin-right: 10px; white-space: nowrap; }
.lotro-card-rw-lp .fa,
.lotro-card-rw-xp .fa { color: #c9aa58; }
.lotro-card-rw-virtue .fa { color: #e06060; }
.lotro-card-rw-rep .fa { color: #5b9bd5; }
.lotro-card-rw-title .fa { color: #b8a040; }

/* ─── Trait Planner Widget ─────────────────────────────────────── */
.lotro-trait-planner {
  margin: 24px 0;
  padding: 20px;
  background: linear-gradient(#0a0e14,#152035,#0a0e14);
  border: 1px solid #3a3a3a;
  border-radius: 8px;
}
.ltp-header { margin-bottom: 12px; }
.ltp-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--lotro-text-light);
  margin: 0 0 4px;
}
.ltp-title .fa { margin-right: 8px; color: #c9aa58; }
.ltp-desc {
  font-size: 13px;
  color: var(--lotro-text-light);
  margin: 0;
}
.ltp-summary {
  font-size: 13px;
  color: var(--lotro-text-light);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid;
}
.ltp-summary strong { color: #c9aa58; }

/* Trees grid — 3 columns on desktop */
.ltp-trees {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.ltp-tree {
  flex: 1;
  min-width: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-top: 3px solid #555;
  border-radius: 6px;
  padding: 10px;
}
.ltp-tree-main { border-color: #555; }
.ltp-tree-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.ltp-tree-name {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
}
.ltp-tree-role {
  font-size: 11px;
  color: #888;
  background: #252525;
  padding: 1px 6px;
  border-radius: 3px;
}
.ltp-tree-spent {
  margin-left: auto;
  font-size: 11px;
  color: #c9aa58;
  font-weight: 600;
}
.ltp-tree-counter {
  font-size: 11px;
  color: #888;
  margin-left: auto;
  background: rgba(0,0,0,0.4);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #444;
}

/* Enhanced controls header */
.ltp-controls-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 1px solid #444;
  border-radius: 6px;
  margin-bottom: 16px;
}
.ltp-points-display {
  font-size: 14px;
  font-weight: 600;
  color: var(--lotro-text-light);
}
.ltp-points-available {
  color: #4CAF50;
  font-weight: 700;
}
.ltp-points-spent {
  color: #c9aa58;
  font-weight: 700;
}
.ltp-controls {
  display: flex;
  gap: 8px;
}
.ltp-reset-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: white;
  border: 1px solid #c62828;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.ltp-reset-btn:hover {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  box-shadow: 0 2px 4px rgba(211, 47, 47, 0.3);
}
.ltp-build-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}
.ltp-build-name {
  padding: 6px 10px;
  background: rgba(0,0,0,0.3);
  color: var(--lotro-text-light);
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 12px;
  width: 200px;
}
.ltp-build-name::placeholder {
  color: #888;
}
.ltp-save-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
  color: white;
  border: 1px solid #66BB6A;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.ltp-save-btn:hover {
  background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

/* Class selector styling */
.ltp-class-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  order: -1; /* Show first */
}
.ltp-class-selector label {
  font-size: 12px;
  font-weight: 600;
  color: #c9aa58;
  white-space: nowrap;
}
.ltp-class-select {
  padding: 6px 10px;
  background: rgba(0,0,0,0.3);
  color: var(--lotro-text-light);
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 12px;
  min-width: 120px;
}
.ltp-class-select option {
  background: #222;
  color: #ddd;
}
.ltp-load-class-btn {
  padding: 6px 10px;
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  color: white;
  border: 1px solid #42A5F5;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.ltp-load-class-btn:hover {
  background: linear-gradient(135deg, #42A5F5 0%, #2196F3 100%);
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

/* Loading state */
.ltp-loading {
  text-align: center;
  padding: 40px 20px;
  color: #c9aa58;
  font-style: italic;
}

/* Level selector controls */
.ltp-level-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}
.ltp-level-label {
  font-size: 12px;
  color: var(--lotro-text-light);
  font-weight: 600;
}
.ltp-level-select {
  padding: 4px 8px;
  background: rgba(0,0,0,0.4);
  color: var(--lotro-text-light);
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  min-width: 120px;
}
.ltp-level-select:focus {
  border-color: #c9aa58;
  outline: none;
  box-shadow: 0 0 4px rgba(201, 170, 88, 0.3);
}
.ltp-level-select option {
  background: #2a2a2a;
  color: var(--lotro-text-light);
}

/* Sharing footer */
.ltp-share-footer {
  margin-top: 16px;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 12px;
  color: #888;
}
.ltp-vote-section {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.ltp-vote-btn {
  padding: 4px 8px;
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  color: white;
  border: 1px solid #FFB74D;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.ltp-vote-btn:hover {
  background: linear-gradient(135deg, #FFB74D 0%, #FF9800 100%);
}
.ltp-vote-btn.liked {
  background: linear-gradient(135deg, #e06060 0%, #c04040 100%);
  border-color: #e06060;
}
.ltp-vote-btn.liked:hover {
  background: linear-gradient(135deg, #e87070 0%, #d05050 100%);
}
.ltp-vote-count {
  font-weight: 600;
  color: #c9aa58;
}
.ltp-permalink {
  margin-bottom: 8px;
}
.ltp-permalink-url {
  margin-left: 8px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.1);
  color: var(--lotro-text-light);
  border: 1px solid #444;
  border-radius: 3px;
  font-size: 11px;
  width: 300px;
}
.ltp-save-notice {
  margin: 8px 0 0 0;
  font-style: italic;
  font-size: 11px;
  color: #666;
}

/* Progression milestones */
.ltp-progression {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid #333;
  flex-wrap: wrap;
}
.ltp-milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.ltp-milestone-active {
  opacity: 1;
}
.ltp-milestone-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  margin-bottom: 2px;
}
.ltp-milestone-active .ltp-milestone-icon {
  border-color: #8b9fd5;
}
.ltp-milestone-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.ltp-milestone-abbr {
  color: #888;
  font-size: 8px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
}
.ltp-milestone-active .ltp-milestone-abbr {
  color: #ddd;
}
.ltp-milestone-points {
  font-size: 8px;
  color: #666;
  font-weight: 600;
}
.ltp-milestone-active .ltp-milestone-points {
  color: #8b9fd5;
}

/* Trait grid rows */
.ltp-grid { display: flex; flex-direction: column; gap: 4px; }
.ltp-row { display: flex; gap: 4px; }
.ltp-cell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px;
  border-radius: 4px;
  background: #1e1e1e;
  position: relative;
  transition: all 0.3s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: default;
  border: 1px solid transparent;
}
.ltp-cell:hover {
  background: rgba(201, 170, 88, 0.1);
  transform: translateY(-1px);
  border-color: rgba(201, 170, 88, 0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ltp-cell-empty { 
  background: transparent; 
}
.ltp-cell-empty-trait { 
  opacity: 0.35;
  transition: opacity 0.3s ease;
}
.ltp-cell-empty-trait:hover {
  opacity: 0.6;
}
.ltp-cell-active { 
  background: #252518;
  border-color: rgba(201, 170, 88, 0.2);
}
.ltp-cell-active:hover { 
  background: rgba(244, 228, 188, 0.15);
  border-color: #c9aa58;
  box-shadow: 0 0 10px rgba(201, 170, 88, 0.3);
}
.ltp-cell-maxed { 
  background: #1e2818;
  border-color: rgba(106, 173, 42, 0.2);
}
.ltp-cell-maxed:hover { 
  background: rgba(106, 173, 42, 0.2);
  border-color: #6aad2a;
  box-shadow: 0 0 10px rgba(106, 173, 42, 0.4);
}
.ltp-cell-milestone { 
  background: #1a1a2a;
  border-color: rgba(139, 159, 213, 0.2);
}
.ltp-cell-milestone:hover { 
  background: rgba(139, 159, 213, 0.15);
  border-color: #8b9fd5;
}
.ltp-cell-milestone.ltp-cell-active { 
  background: #1e1e30;
  border-color: rgba(139, 159, 213, 0.3);
}

/* Point allocation animations */
@keyframes pointAllocated {
  0% { transform: scale(1) translateY(0); }
  50% { 
    transform: scale(1.05) translateY(-2px);
    background: rgba(201, 170, 88, 0.4) !important;
    box-shadow: 0 0 16px rgba(201, 170, 88, 0.6);
  }
  100% { transform: scale(1) translateY(0); }
}

@keyframes pointRemoved {
  0% { transform: scale(1); }
  50% { 
    transform: scale(0.95);
    background: rgba(255, 87, 87, 0.3) !important;
  }
  100% { transform: scale(1); }
}

.ltp-cell.point-allocated {
  animation: pointAllocated 0.4s ease-out;
}

.ltp-cell.point-removed {
  animation: pointRemoved 0.3s ease-out;
}

/* Trait icon placeholder */
.ltp-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 2px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  margin-bottom: 3px;
  font-size: 12px;
  cursor: default;
  transition: all 0.2s ease;
}
.ltp-cell:hover .ltp-icon {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.ltp-cell-active .ltp-icon { border-color: #c9aa58; }
.ltp-cell-active:hover .ltp-icon {
  border-color: #f4e4bc;
  box-shadow: 0 4px 20px rgba(244, 228, 188, 0.7);
}
.ltp-cell-maxed .ltp-icon { border-color: #6aad2a; }
.ltp-cell-maxed:hover .ltp-icon {
  border-color: #8bc34a;
  box-shadow: 0 4px 20px rgba(139, 195, 74, 0.7);
}
.ltp-cell-milestone .ltp-icon {
  border-radius: 50%;
  border-color: #5b6899;
}
.ltp-cell-milestone.ltp-cell-active .ltp-icon { border-color: #8b9fd5; }
.ltp-cell-milestone:hover .ltp-icon {
  border-color: #9fb5e5;
  box-shadow: 0 4px 20px rgba(159, 181, 229, 0.7);
}
.ltp-icon-abbr {
  color: #888;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
}
.ltp-cell-active .ltp-icon-abbr { color: #ddd; }
.ltp-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.ltp-cell:hover .ltp-icon-img {
  filter: brightness(1.1) contrast(1.05);
  transform: scale(1.02);
}
.ltp-cell-active:hover .ltp-icon-img {
  filter: brightness(1.15) contrast(1.1) saturate(1.1);
}
.ltp-cell-maxed:hover .ltp-icon-img {
  filter: brightness(1.2) contrast(1.1) saturate(1.2);
}
.ltp-cell-milestone:hover .ltp-icon-img {
  filter: brightness(1.1) contrast(1.05) hue-rotate(5deg);
}

/* Trait name */
.ltp-trait-name {
  font-size: 9px;
  color: #999;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.ltp-cell:hover .ltp-trait-name {
  color: #ddd;
}
.ltp-cell-active:hover .ltp-trait-name {
  color: #f4e4bc;
}
.ltp-cell-active .ltp-trait-name { color: #ccc; }

/* Enhanced rank badge with interaction feedback */
.ltp-rank {
  font-size: 10px;
  color: #888;
  text-align: center;
  margin-top: 2px;
  padding: 1px 3px;
  background: rgba(0,0,0,0.3);
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  pointer-events: none;
  position: relative;
}
.ltp-badge {
  font-size: 10px;
  text-align: center;
  margin-top: 2px;
  padding: 1px 3px;
  background: rgba(0,0,0,0.3);
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  pointer-events: none;
  position: relative;
}

.ltp-rank-empty, .ltp-rank-0 {
  color: #666;
  border-color: #444;
}
.ltp-rank-active, .ltp-rank-1, .ltp-rank-2, .ltp-rank-3, .ltp-rank-4 {
  color: #c9aa58;
  border-color: #c9aa58;
  background: rgba(201, 170, 88, 0.1);
}
.ltp-rank-maxed, .ltp-rank-5 {
  color: #6aad2a;
  border-color: #6aad2a;
  background: rgba(106, 173, 42, 0.15);
  font-weight: 600;
}
.ltp-cell:hover .ltp-rank, .ltp-cell:hover .ltp-badge {
  background: rgba(244, 228, 188, 0.2);
}
.ltp-cell-active:hover .ltp-rank-active {
  color: #f4e4bc;
  border-color: #f4e4bc;
}
.ltp-cell-maxed:hover .ltp-rank-maxed {
  color: #8bc34a;
  border-color: #8bc34a;
}

/* Visual feedback for point allocation */
.ltp-cell[data-can-allocate="true"]:after {
  content: '+';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  color: #6aad2a;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  line-height: 10px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ltp-cell[data-can-allocate="true"]:hover:after {
  opacity: 1;
}
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
}
.ltp-cell-active .ltp-rank { color: #c9aa58; }
.ltp-cell-maxed .ltp-rank { color: #6aad2a; }

/* Virtues */
.ltp-virtues {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #333;
  margin-bottom: 8px;
}
.ltp-virtues-label {
  font-size: 12px;
  color: #999;
  font-weight: 600;
}
.ltp-virtues-label .fa { color: #e06060; margin-right: 4px; }
.ltp-virtue {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 8px;
  padding: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border: 1px solid #333;
  transition: all 0.2s ease;
  min-width: 60px;
  position: relative;
  cursor: pointer;
}
.ltp-virtue:hover {
  background: rgba(244, 228, 188, 0.1);
  border-color: #c9aa58;
  transform: translateY(-2px);
}
.ltp-virtue-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 2px solid #555;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}
.ltp-virtue:hover .ltp-virtue-icon {
  border-color: #c9aa58;
  transform: scale(1.1);
}
.ltp-virtue-name {
  font-size: 9px;
  color: #ccc;
  text-align: center;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 2px;
}
.ltp-virtue:hover .ltp-virtue-name {
  color: #f4e4bc;
}

/* Editable virtue empty slot */
.ltp-virtue-empty {
  border-style: dashed;
  border-color: #555;
  opacity: 0.6;
}
.ltp-virtue-empty:hover {
  opacity: 1;
  border-color: #c9aa58;
}
.ltp-virtue-plus {
  color: #888;
  font-size: 20px;
  font-weight: 300;
}
.ltp-virtue-empty:hover .ltp-virtue-plus {
  color: #c9aa58;
}

/* Virtue picker overlay */
.ltp-virtue-picker-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
}
.ltp-virtue-picker {
  width: 320px;
  max-height: 400px;
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 10001;
  display: flex;
  flex-direction: column;
}
.ltp-virtue-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #333;
  font-size: 13px;
  font-weight: 600;
  color: #f4e4bc;
}
.ltp-virtue-picker-close {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.ltp-virtue-picker-close:hover { color: #fff; }
.ltp-virtue-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
  max-height: 320px;
}
.ltp-virtue-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.ltp-virtue-picker-item:hover {
  background: rgba(244, 228, 188, 0.1);
  border-color: #c9aa58;
}
.ltp-virtue-picker-current {
  background: rgba(201, 170, 88, 0.2);
  border-color: #c9aa58;
}
.ltp-virtue-picker-used {
  opacity: 0.35;
}
.ltp-virtue-picker-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid #555;
  margin-bottom: 2px;
}
.ltp-virtue-picker-name {
  font-size: 9px;
  color: #ccc;
  text-align: center;
  line-height: 1.2;
}
.ltp-virtue-picker-item:hover .ltp-virtue-picker-name { color: #f4e4bc; }
.ltp-virtue-picker-clear {
  padding: 6px 12px;
  border-top: 1px solid #333;
  text-align: center;
}
.ltp-virtue-picker-clear-btn {
  background: none;
  border: 1px solid #555;
  color: #ccc;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}
.ltp-virtue-picker-clear-btn:hover {
  border-color: #e06060;
  color: #e06060;
}

/* ─── Trait Planner Embedded Viewer ─────────────────────────────────────── */
.trait-planner-embed {
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  background: #1a1a1a;
}

.trait-planner-embed iframe {
  display: block;
  border: none;
  width: 100%;
  min-height: 500px;
  background: transparent;
}

/* Responsive adjustments for embedded viewer */
@media (max-width: 768px) {
  .trait-planner-embed iframe {
    min-height: 400px;
  }
}
  color: #f4e4bc;
}
.ltp-virtue-fallback {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  color: #ccc;
  border-radius: 4px;
  border: 2px solid #555;
  font-weight: 600;
  font-size: 14px;
}

/* Credit */
.ltp-credit {
  font-size: 10px;
  color: #666;
  text-align: right;
}
.ltp-credit a { color: #888; text-decoration: none; }
.ltp-credit a:hover { color: #c9aa58; text-decoration: underline; }

/* Specialization bar */
.ltp-spec-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ltp-spec-bar-label {
  font-size: 12px;
  color: #aaa;
  font-weight: 600;
  margin-right: 4px;
}
.ltp-spec-btn {
  padding: 5px 14px;
  background: #252525;
  border: 2px solid #555;
  border-radius: 4px;
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ltp-spec-btn:hover:not(:disabled) {
  background: #333;
  color: #fff;
}
.ltp-spec-btn-active {
  color: #fff;
  font-weight: 700;
  border-width: 2px;
}
.ltp-spec-btn-aux {
  opacity: 0.5;
  cursor: not-allowed;
  font-style: italic;
}

/* Specialization and cost labels in tree header */
.ltp-spec-badge {
  font-size: 10px;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  font-weight: 700;
}
.ltp-aux-badge {
  font-size: 10px;
  color: #8ab4f8;
  background: rgba(138, 180, 248, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(138, 180, 248, 0.25);
}
.ltp-cost-label {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
}
.ltp-cost-offspec {
  color: #ff8a80;
  background: rgba(255, 138, 128, 0.1);
  border: 1px solid rgba(255, 138, 128, 0.25);
}
.ltp-cost-aux {
  color: #8ab4f8;
  background: rgba(138, 180, 248, 0.1);
  border: 1px solid rgba(138, 180, 248, 0.2);
}

/* Tier locking */
.ltp-row-locked {
  opacity: 0.35;
  pointer-events: none;
  position: relative;
}
.ltp-row-locked::before {
  content: '🔒';
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  z-index: 1;
}
.ltp-cell-locked {
  opacity: 0.4;
  cursor: not-allowed !important;
}

/* Auxiliary tree styling */
.ltp-tree-auxiliary {
  border-style: dashed;
}

/* Responsive: stack trees vertically on mobile */
@media (max-width: 768px) {
  .ltp-trees { flex-direction: column; }
  .ltp-tree { flex: none; }
}
.lotro-card-rw-money .fa { color: #aaa; }
.lotro-card-rewards .lotro-game-icon { vertical-align: text-bottom; margin-right: 2px; }
.gh-device-status .fa-exclamation-triangle { color: #c09853; }
.skill-detail-cell {
  width: auto;
}

.skill-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.skill-effect {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  line-height: 1.5;
}

.skill-effect-debuff {
  background: rgba(200, 100, 200, 0.12);
  color: #d899d8;
  border: 1px solid rgba(200, 100, 200, 0.2);
}

.skill-effect-dot {
  background: rgba(80, 200, 80, 0.12);
  color: #70c870;
  border: 1px solid rgba(80, 200, 80, 0.2);
}

.skill-effect-cc {
  background: rgba(255, 80, 80, 0.15);
  color: #ff8888;
  border: 1px solid rgba(255, 80, 80, 0.25);
}

.skill-effect-countdown {
  background: rgba(255, 200, 50, 0.12);
  color: #e0c040;
  border: 1px solid rgba(255, 200, 50, 0.2);
}

.skill-cc {
  font-weight: 700;
}

/* Responsive: stack badges under name on narrow screens */
@media (max-width: 767px) {
  .instance-ability-table thead th:nth-child(2),
  .instance-ability-table tbody td.skill-detail-cell {
    display: none;
  }
  .skill-name-cell {
    white-space: normal;
  }
  .skill-badges {
    margin-bottom: 2px;
  }
}

.instance-loot-btn {
  white-space: nowrap;
}

/* ─── Cusdis Comments ────────────────────────────────────────────────────── */
.comments-section {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 30px;
}
#cusdis_thread iframe {
  display: block;
  color-scheme: dark;
  width: 100%;
  min-height: 350px;
  border: 0;
}

/* ─── Card Widget (Related Posts) ────────────────────────────────────────── */
.card-widget {
  background: var(--lotro-dark-mid) !important;
  border: 1px solid rgba(255, 255, 255, .06) !important;
  border-radius: 12px !important;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35) !important;
}
.card-widget .card-img img {
  border-radius: 12px 12px 0 0 !important;
  margin-bottom: 0 !important;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.card-widget .card-block {
  padding: 14px 16px 16px !important;
}
.card-widget .card-title {
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 6px;
}
.card-widget .card-title a {
  color: var(--lotro-parchment);
}
.card-widget .card-title a:hover {
  color: var(--lotro-gold);
}
.card-widget .card-meta {
  color: var(--lotro-text-light) !important;
  font-size: 12px;
  margin-bottom: 8px;
}
.card-widget .card-block p {
  font-size: 13px;
  color: rgba(245, 240, 225, .7);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-read-more {
  font-size: 12px;
  padding: 4px 14px !important;
}

/* ─── Subtitle Override ──────────────────────────────────────────────────── */
.subtitle {
  color: var(--lotro-text);
  border-left-color: var(--lotro-dark-accent);
  font-size: 1.1rem;
  letter-spacing: .04em;
}

/* ─── Lint Plugin (Spell & Grammar Check) ─────────────────── */
.lint-problem {
  position: relative;
}
.lint-problem.lint-error {
  background: rgba(255, 0, 0, 0.12);
  border-bottom: 2px wavy #e53935;
}
.lint-problem.lint-warning {
  background: rgba(255, 165, 0, 0.10);
  border-bottom: 2px wavy #f4a100;
}
.lint-problem.lint-info {
  background: rgba(66, 133, 244, 0.08);
  border-bottom: 1px dashed #6fa8dc;
}
.lint-icon {
  display: inline-block;
  position: absolute;
  right: -20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 14px;
  text-align: center;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  z-index: 5;
  vertical-align: top;
  margin-top: 2px;
}
.lint-icon::after {
  content: '!';
}
.lint-icon-error {
  background: #e53935;
}
.lint-icon-error::after {
  content: '✗';
}
.lint-icon-warning {
  background: #f4a100;
}
.lint-icon-info {
  background: #6fa8dc;
}
.lint-icon-info::after {
  content: 'i';
}
/* Lint count badge in toolbar */
.lint-count-badge {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  background: #f4a100;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  padding: 0 4px;
  vertical-align: middle;
  margin-left: 2px;
}
.lint-count-badge.lint-count-error {
  background: #e53935;
}
.lint-count-badge.lint-count-ok {
  background: #43a047;
}
/* Position lint icons in the gutter via overflow on the editor */
.pm-editor-content .ProseMirror {
  position: relative;
  padding-right: 30px;
}
