/* Duckit Viewer styles (dark) */
:root{
  --bg:#0b0f16;
  --panel:#111827;
  --panel2:#0f172a;
  --text:#e5e7eb;
  --border:rgba(255,255,255,.10);
  --border2:rgba(255,255,255,.14);
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --accent:#60a5fa;
  --danger:#f87171;
  --pill:#0b1220;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
@font-face {
  font-family: "finalf";
  src: url("/assets/FFXIV_Lodestone_SSF.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Keep your Leaflet popup too */
.leaflet-popup-content-wrapper,
.leaflet-popup-content-wrapper * {
  font-family: "finalf", Arial, Helvetica, sans-serif !important;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: "finalf", Arial, Helvetica, sans-serif;
  color:var(--text);
  background:radial-gradient(1600px 600px at 20% 0%, rgba(96,165,250,.12), transparent 60%),
             radial-gradient(900px 500px at 80% 20%, rgba(34,211,238,.10), transparent 55%),
             var(--bg);
}

a{color:inherit}

.mono{font-family:var(--mono)}
.right{text-align:right}

.topbar{
  position:sticky;
  top:0;
  z-index:2000;
  background:rgba(11,15,22,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar__inner{
  max-width:1600px;
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.title__h1{font-size:18px;font-weight:700}
.title__sub{font-size:12px;margin-top:2px}

.container{
  max-width:1600px;
  margin:18px auto;
  padding:0 18px 40px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.card__header{
  padding:6px 6px 6px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,.02);
  flex-wrap: wrap;
}
.card__header_s{
  padding:6px 6px 6px;
  display:flex;
  justify-content: center;
  column-gap: 10px;
  background:rgba(255,255,255,.02);
  flex-wrap: wrap;
    align-items: end;
}
.card__title{font-weight:700}
.card__subtitle{font-size:12px;;margin-top:4px}

.meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pill{
  background:var(--pill);
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
}

.btn{
  background:rgba(255,255,255,.04);
  color:var(--text);
  border:1px solid var(--border2);
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  transition:transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
}
.btn:hover{background:rgba(255,255,255,.07)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn--primary{
  background:rgba(96,165,250,.18);
  border-color:rgba(96,165,250,.35);
}
.btn--primary:hover{background:rgba(96,165,250,.24)}
.btn--sm{padding:6px 8px;border-radius:9px;font-size:12px}

.topbar__actions{display:flex;gap:10px;align-items:center}

.grid{
  padding:14px;
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:12px;
}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:12px;}
.field input, .field select{
  width:100%;
  background:rgba(0,0,0,.20);
  color:var(--text);
  border:1px solid var(--border2);
  border-radius:10px;
  padding:9px 10px;
  outline:none;
  border: 1px solid brown;
}
.field input:focus, .field select:focus{
  border-color:rgba(96,165,250,.55);
  box-shadow:0 0 0 3px rgba(96,165,250,.15);
}
.field select{appearance:none;;}

/* Fix white-on-white dropdown option list (browser default) */
select option{
  background:var(--panel2);
  color:var(--text);
}

.field--inline{display:flex;flex-direction:column;gap:6px}
.field--inline select{min-width:220px}

.span2{grid-column: span 2}

.error{
  padding:0 14px 14px;
  color:var(--danger);
  min-height:18px;
  font-size:13px;
}

.pager{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.tablewrap{overflow:auto}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table thead th{
  position:sticky;
  top:0;
  background:rgba(15,23,42,.90);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--border);
  padding:10px 10px;
  font-size:12px;
  text-align:left;
  ;
    text-align: center;
}
.table tbody td{
  border-bottom:1px solid rgba(255,255,255,.06);
  padding:9px 10px;
  font-size:13px;
}
.table tbody tr:hover{background:rgba(255,255,255,.03)}
.table tbody tr.is-selected{
  background:rgba(96,165,250,.14);
  outline:1px solid rgba(96,165,250,.30);
}

.chk{display:flex;align-items:center;gap:8px;;font-size:13px}
.chk input{accent-color: var(--accent)}

.maplayout{
  display:flex;
  gap:12px;
  padding:14px;
}
.maplayout__side{
  width: 375px;
}
.maplayout__main{flex:1 1 auto;min-width:0;max-width: 1000px;}

.mapfilters{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:rgba(0,0,0,.18);
}
.mapfilters__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.mapfilters__actions{display:flex;gap:8px;flex-wrap:wrap}

.map{
	height: 1000px;
	width: 1000px;
	max-width: 100%;
	max-height: 100%;
  border:1px solid var(--border);
  overflow:hidden;
}
.maphint{
  white-space: pre-wrap;
  margin-top:10px;
  padding:10px 12px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:12px;
  ;
  background:rgba(0,0,0,.14);
  word-break:break-word;
  font-size:12px;
}

@media (max-width: 980px){
  .grid{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .span2{grid-column: span 2}
  .maplayout{flex-direction:column}
  .maplayout__side{width:auto;flex:0 0 auto}
  .field--inline select{min-width:160px}
}


.tg  {border-collapse:collapse;border-spacing:0;}
.tg th, .tg td{border-color:black;border-style:solid;border-width:1px;}
.tg .tg-baqh{text-align:center;vertical-align:center}
.leaflet-container {
  background:#0b0f16 !important;
}

.maptypefilter_category{
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 6px 8px;
}

.map-coords {
  position: absolute;
  z-index: 2000;
  border-top: 1px solid aqua;
  padding: 4px 8px;
  font: 12px / 1.2 monospace;
  background: rgba(0, 0, 0, 0.6);
  color: rgb(255, 255, 255);
  border-radius: 4px;
  pointer-events: none;
  user-select: none;
}





















/* --- Special Shop Dropdown --- */

.shop-extra { width: 100%; max-width: 900px; }

.shop-extra label {
  font-weight: 600;
  font-size: 13px;
  opacity: 0.85;
}

.shop-extra select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-color: rgba(30, 30, 30, 0.95);
  color: #e6e6e6;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;

  padding: 8px 36px 8px 12px;
  font-size: 14px;
  line-height: 1.4;

  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.shop-extra select:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.shop-extra select:focus {
  outline: none;
  border-color: #6aa9ff;
  box-shadow: 0 0 0 2px rgba(106, 169, 255, 0.25);
}

/* custom arrow */
.shop-extra select {
  background-image:
    linear-gradient(45deg, transparent 50%, #aaa 50%),
    linear-gradient(135deg, #aaa 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* --- Shop Table --- */

.shop-extra table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;

  background: rgba(20, 20, 20, 0.85);
  border-radius: 10px;
}

.shop-extra thead {
  background: linear-gradient(to bottom, rgba(70, 70, 70, 0.35), rgba(40, 40, 40, 0.35));
}

.shop-extra th {
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;

  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.shop-extra td {
  padding: 9px 12px;
  font-size: 14px;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-extra tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.shop-extra tbody tr:last-child td {
  border-bottom: none;
}

/* cost rows inside table */
.shop-extra td div {
  opacity: 0.9;
}

/* shop title */
.shop-extra > div > div:first-child {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.shopicon {
  height: 32px;
  width: 32px;
}
/* cost row layout */
.shop-cost-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* icon + tooltip container */
.shop-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* icon */
.shopicon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

/* tooltip (hidden by default) */
.shop-icon-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);

  min-width: 160px;
  max-width: 360px;

  padding: 6px 8px;
  border-radius: 6px;

  background: rgba(15,15,15,0.96);
  border: 1px solid rgba(255,255,255,0.18);

  font-size: 12px;
  line-height: 1.35;
  white-space: normal;

  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  transform: translateX(-50%) translateY(4px);

  z-index: 9999;
}

/* tooltip arrow */
.shop-icon-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  border-width: 6px;
  border-style: solid;
  border-color: rgba(15,15,15,0.96) transparent transparent transparent;
}

/* show on hover */
.shop-icon-wrap:hover .shop-icon-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#bottom_popup, .shop-extra__table,.shop-extra__list { overflow: visible; }
