/* Diplomaps - dark theme */

body {
  background: #232323;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  margin: 0;
  padding: 0;
}

#wrap {
  width: 780px;
  margin: 0 auto;
  background: #2b2b2b;
  border: 3px ridge #555555;
  border-top: none;
  padding: 8px;
}

#masthead {
  background: #1f1f1f;
  color: #ffffff;
  width: 100%;
  border-bottom: 3px double #555555;
}
#masthead .brand a {
  color: #ffd54f;
  text-decoration: none;
  font-family: "Times New Roman", serif;
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 4px;
  padding: 4px 8px;
  display: block;
}
#masthead .nav {
  background: #2e2e2e;
  color: #ffffff;
  text-align: right;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
}
#masthead .nav b { color: #ffd54f; }
#masthead .phase-countdown {
  background: #262626;
  color: #ffd54f;
  text-align: center;
  padding: 2px 8px;
  font-size: 11px;
  border-top: 1px solid #3a3a3a;
}

#content h1 {
  font-family: "Times New Roman", serif;
  color: #ffd54f;
  border-bottom: 2px solid #555555;
  margin-top: 10px;
}

.error {
  background: #5a1e1e;
  border: 1px solid #c33;
  padding: 4px 8px;
  font-weight: bold;
  color: #ff9999;
}
.hint { color: #aaaaaa; font-size: 11px; }

.box {
  border: 2px groove #555555;
  background: #262626;
  margin: 10px 0;
}
.box .lbl { text-align: right; padding: 4px 8px; color: #cccccc; }

#legend { margin: 8px 0; font-size: 11px; color: #bbbbbb; }

.world { border: 2px solid #555555; width: 100%; }
.world .head { background: #333333; }
.world .head th { font-weight: bold; }
.world .num { text-align: right; }
.world .country { background: #3a3a3a; font-weight: bold; color: #ffd54f; }
.world .even { background: #2f2f2f; }
.world .odd { background: #282828; }
.world td, .world th { border: 1px solid #555555; padding: 1px 6px; }
.world td.actions { white-space: nowrap; text-align: center; }
.world td.actions button {
  background: #3a3a3a;
  border: 1px outset #555555;
  color: #ffd54f;
  font-size: 11px;
  min-width: 17px;
  padding: 0 2px;
  margin: 0 1px;
  cursor: pointer;
}
.world td.actions button:hover { background: #4a4a4a; }

table.info { border: 2px solid #555555; width: 100%; margin: 8px 0; }
table.info td { border: 1px solid #555555; padding: 2px 6px; }
table.info .lbl {
  text-align: right; color: #cccccc; width: 120px; background: #333333;
}
h2 {
  font-family: "Times New Roman", serif; color: #ffd54f;
  border-bottom: 1px solid #555555; margin-top: 14px;
}
.city-top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 8px 0;
}
.city-top .info {
  width: 40%;
  margin: 0;
}
.city-top .map-frame {
  width: auto;
  flex: 1 1 0;
  height: 320px;
}

.map-frame {
  width: 100%;
  height: 380px;
  border: 2px solid #555555;
  background: #1f1f1f;
}

/* Leaflet city-map markers: colored alliance pins, white when unclaimed.
   Size, fill and glow are set inline from the marker data; the missing
   shadows (red halo) are gone, replaced by the per-army alliance glow. */
.city-marker { background: transparent; border: none; }
.pin {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid black;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
  position: relative;
}

/* Crossed-swords glyph: centers in a contested marker, always legible. */
.pin-swords {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-shadow: 0 0 3px #000000, 0 0 1px #000000;
  font-size: 0.7em;
  line-height: 1;
  pointer-events: none;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: #2b2b2b;
  color: #ffffff;
}
.leaflet-popup-content { font: 13px Arial, Helvetica, sans-serif; }
.leaflet-popup-content a { color: #ffcc00; font-weight: bold; }
.leaflet-popup-content .swatch {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 1px solid #888888;
  vertical-align: -0.1em;
  margin-right: 0.2em;
}
.leaflet-popup-content em { color: #aaaaaa; }

.placeholder {
  border: 1px dashed #555555; background: #262626; padding: 8px;
  color: #aaaaaa; font-size: 12px;
}

.badge, .capital, .coastal {
  font-size: 10px;
  border: 1px solid #888888;
  padding: 0 3px;
  margin-left: 5px;
  margin-right: 5px;
}
.coastal { background: #1e3a4a; color: #7fd0ff; }
.capital { background: #4a3d0a; color: #ffd54f; }

.danger { color: #ff6b6b; font-weight: bold; }

.attrition-badge {
  display: inline-block;
  width: 1.1em;
  margin-left: 5px;
  text-align: center;
  color: #ff6b6b;
}

.swatch {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 1px solid #888888;
  vertical-align: -0.1em;
}

.inline { display: inline; }
.inline button {
  background: #3a3a3a;
  border: 1px outset #555555;
  font-size: 12px;
  font-family: Arial, sans-serif;
  color: #ffd54f;
  cursor: pointer;
}
input, button {
  background: #3a3a3a;
  border: 1px outset #555555;
  font-family: Arial, sans-serif;
  color: #ffffff;
}
input[type="submit"] { color: #ffd54f; }

a { color: #ffcc00; font-weight: bold; text-decoration: none; }
a:visited { color: #d4af37; }

#footer {
  margin-top: 16px;
  border-top: 1px dotted #555555;
  padding-top: 4px;
  color: #888888;
  font-size: 10px;
  text-align: center;
}

/* Army action popups */
.action-menu { margin: 8px 0; }
.action-menu button { margin-right: 6px; }

.popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* Above Leaflet's panes and controls (max z-index 1000). */
  z-index: 1100;
  width: 320px;
  max-width: 90%;
  background: #2b2b2b;
  border: 2px groove #555555;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.55);
  padding: 10px 14px;
}
.popup[hidden] { display: none; }
.popup-title {
  font-family: "Times New Roman", serif;
  font-size: 16px;
  color: #ffd54f;
  border-bottom: 1px solid #555555;
  margin-bottom: 8px;
}
.popup label { display: block; margin: 6px 0; color: #cccccc; }
.popup select,
.popup input[type="number"],
.popup input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
  padding: 2px;
}
.popup-buttons { margin-top: 10px; text-align: right; }
.popup-buttons button { margin-left: 6px; }
.popup-error {
  color: #ff6b6b;
  min-height: 1em;
  font-size: 11px;
  margin-top: 6px;
}
