/* WMC Brīvās telpas — publiskā daļa. Viss ierobežots zem .wmc-bt, lai nekonfliktētu ar tēmu. */

.wmc-bt {
  --wmcbt-paper: #FAFAF7;
  --wmcbt-surface: #FFFFFF;
  --wmcbt-ink: #1C2430;
  --wmcbt-ink-soft: #5B6572;
  --wmcbt-line: #E4E2DB;
  --wmcbt-accent: #01A2DD;
  --wmcbt-accent-dark: #0187B8;
  --wmcbt-accent-soft: #E6F5FC;
  --wmcbt-ok: #1F7A46;   --wmcbt-ok-bg: #E7F3EC;
  --wmcbt-soon: #1D5FA8; --wmcbt-soon-bg: #E8F0FA;
  --wmcbt-warn: #9A6A12; --wmcbt-warn-bg: #F8F0DE;
  --wmcbt-hold: #5B6572; --wmcbt-hold-bg: #EEF0F2;
  --wmcbt-sale: #7A3B8F; --wmcbt-sale-bg: #F3EBF7;
  --wmcbt-radius: 14px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--wmcbt-ink);
  line-height: 1.5;
  font-size: 15px;
}
.wmc-bt *, .wmc-bt *::before, .wmc-bt *::after { box-sizing: border-box; }
.wmc-bt a { color: inherit; }

/* ---------- Galvene ---------- */
.wmc-bt-head { padding: 10px 0 22px; }
.wmc-bt-h3 {
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-variation-settings: 'wdth' 88;
  font-weight: 700; font-size: 22px; line-height: 1.25;
  text-transform: none; letter-spacing: 0;
  margin: 0; padding: 0; color: var(--wmcbt-ink);
}
.wmc-bt-head-meta {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 26px;
  color: var(--wmcbt-ink-soft); font-size: 13.5px;
}
.wmc-bt-head-meta b { color: var(--wmcbt-ink); font-weight: 600; }
.wmc-bt-contact { margin-top: 10px; color: var(--wmcbt-ink-soft); font-size: 13.5px; }
.wmc-bt-contact b { color: var(--wmcbt-ink); font-weight: 600; display: block; margin-bottom: 2px; }
.wmc-bt-contact-row { margin-top: 3px; }
.wmc-bt .wmc-bt-head-meta a,
.wmc-bt .wmc-bt-contact a { color: var(--wmcbt-accent); text-decoration: none; border-bottom: 1px solid transparent; }
.wmc-bt .wmc-bt-head-meta a:hover,
.wmc-bt .wmc-bt-contact a:hover { border-bottom-color: var(--wmcbt-accent); color: var(--wmcbt-accent); }
.wmc-bt a.wmc-bt-download,
.wmc-bt a.wmc-bt-download:visited {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 16px;
  background: var(--wmcbt-accent); color: #fff !important;
  text-decoration: none; border: 0; box-shadow: none;
  font: 600 13px 'Inter', system-ui, sans-serif;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 12px 24px; border-radius: 999px; transition: .15s;
}
.wmc-bt a.wmc-bt-download:hover { background: var(--wmcbt-accent-dark); color: #fff !important; }
.wmc-bt-download svg { flex: none; }

/* ---------- Filtri ---------- */
.wmc-bt-toolbar {
  position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 20;
  background: rgba(250, 250, 247, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wmcbt-line);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px 14px; margin-bottom: 4px;
}
.wmc-bt-search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 8px;
  background: var(--wmcbt-surface); border: 1px solid var(--wmcbt-line);
  border-radius: 999px; padding: 9px 16px; margin: 0;
}
/* Admin joslas nobīde arī WP < 5.9 (kur --wp-admin--admin-bar--height nepastāv)
   un <=600px, kur josla ritinās līdzi lapai. */
body.admin-bar .wmc-bt-toolbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .wmc-bt-toolbar { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .wmc-bt-toolbar { top: 0; } }
.wmc-bt-search svg { flex: none; color: var(--wmcbt-ink-soft); }
.wmc-bt .wmc-bt-search input[type="search"] {
  border: 0; outline: 0; background: none; box-shadow: none;
  font: inherit; font-size: 15px; width: 100%; color: var(--wmcbt-ink); padding: 0; margin: 0;
}
.wmc-bt .wmc-bt-search input[type="search"]::placeholder { font-size: 15px; color: var(--wmcbt-ink-soft); opacity: 1; }
.wmc-bt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wmc-bt-chip {
  border: 1px solid var(--wmcbt-line); background: var(--wmcbt-surface);
  border-radius: 999px; padding: 7px 13px;
  font: 500 13px 'Inter', system-ui, sans-serif;
  color: var(--wmcbt-ink-soft); cursor: pointer; transition: .15s;
  line-height: 1.2; text-transform: none;
}
.wmc-bt-chip:hover { border-color: var(--wmcbt-ink-soft); background: var(--wmcbt-surface); color: var(--wmcbt-ink-soft); }
.wmc-bt-chip[aria-pressed="true"] { background: var(--wmcbt-ink); border-color: var(--wmcbt-ink); color: #fff; }
.wmc-bt button.wmc-bt-clear {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--wmcbt-accent); background: var(--wmcbt-surface);
  border-radius: 999px; padding: 7px 14px;
  font: 600 13px 'Inter', system-ui, sans-serif;
  color: var(--wmcbt-accent); cursor: pointer; transition: .15s;
  line-height: 1.2; text-transform: none;
}
.wmc-bt button.wmc-bt-clear:hover { background: var(--wmcbt-accent); color: #fff; }
.wmc-bt button.wmc-bt-clear[hidden] { display: none; }
.wmc-bt select.wmc-bt-sort {
  border: 1px solid var(--wmcbt-line); background-color: var(--wmcbt-surface);
  border-radius: 999px; padding: 8px 38px 8px 14px;
  font: 500 13px 'Inter', system-ui, sans-serif;
  color: var(--wmcbt-ink); cursor: pointer; outline: none; max-width: 100%;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235B6572' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ---------- Režģis ---------- */
.wmc-bt-countline { color: var(--wmcbt-ink-soft); font-size: 13px; margin: 12px 0 16px; }
.wmc-bt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}
@media (max-width: 400px) { .wmc-bt-grid { grid-template-columns: 1fr; } }

/* ---------- Kartīte ---------- */
.wmc-bt-card {
  background: var(--wmcbt-surface); border: 1px solid var(--wmcbt-line);
  border-radius: var(--wmcbt-radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .18s, translate .18s;
}
.wmc-bt-card:hover { box-shadow: 0 10px 28px rgba(28, 36, 48, .10); translate: 0 -2px; }
.wmc-bt-card[hidden] { display: none; }

/* Foto karuselis */
.wmc-bt-photos { position: relative; aspect-ratio: 16/10; background: var(--wmcbt-accent-soft); overflow: hidden; }
.wmc-bt-track { display: flex; height: 100%; transition: transform .3s ease; }
.wmc-bt-track > * {
  flex: 0 0 100%; width: 100%; height: 100%;
  object-fit: cover; display: block; max-width: 100%;
}
/* Augstāka specifika par tēmu ".entry-content img { height:auto }" līdzīgiem likumiem. */
.wmc-bt .wmc-bt-track img { height: 100%; }
/* Proporciju rezerve pārlūkiem bez aspect-ratio (Safari <=14, Chrome <=87). */
@supports not (aspect-ratio: 16 / 10) {
  .wmc-bt-photos { height: 0; padding-top: 62.5%; }
  .wmc-bt-track,
  .wmc-bt-placeholder { position: absolute; top: 0; left: 0; right: 0; bottom: 0; height: auto; }
}
.wmc-bt-phnav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: var(--wmcbt-ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  opacity: 0; transition: .15s; padding: 0; font-size: 18px; line-height: 1;
}
.wmc-bt-photos:hover .wmc-bt-phnav, .wmc-bt-phnav:focus-visible { opacity: 1; }
.wmc-bt-phprev { left: 10px; } .wmc-bt-phnext { right: 10px; }
.wmc-bt-zoom {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: var(--wmcbt-ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  opacity: 0; transition: .15s; padding: 0;
}
.wmc-bt-photos:hover .wmc-bt-zoom, .wmc-bt-zoom:focus-visible { opacity: 1; }
@media (hover: none) { .wmc-bt-zoom { opacity: 1; } }
.wmc-bt-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.wmc-bt-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.wmc-bt-dots i.on { background: #fff; }
.wmc-bt-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--wmcbt-accent);
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(1, 162, 221, .06) 14px 28px), var(--wmcbt-accent-soft);
}
.wmc-bt-placeholder span {
  font: 600 11px 'Inter', system-ui, sans-serif;
  letter-spacing: .1em; text-transform: uppercase; opacity: .75;
}
.wmc-bt-badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  max-width: calc(100% - 62px);
}
.wmc-bt-badge {
  display: inline-block;
  font: 600 11.5px 'Inter', system-ui, sans-serif;
  letter-spacing: .02em; padding: 5px 10px; border-radius: 999px;
}
.wmc-bt-b-ok   { background: var(--wmcbt-ok-bg);   color: var(--wmcbt-ok); }
.wmc-bt-b-soon { background: var(--wmcbt-soon-bg); color: var(--wmcbt-soon); }
.wmc-bt-b-bad  { background: var(--wmcbt-warn-bg); color: var(--wmcbt-warn); }
.wmc-bt-b-hold { background: var(--wmcbt-hold-bg); color: var(--wmcbt-hold); }
.wmc-bt-b-cond { background: var(--wmcbt-hold-bg); color: var(--wmcbt-hold); }
.wmc-bt-b-sale { background: var(--wmcbt-sale-bg); color: var(--wmcbt-sale); }

/* Saturs */
.wmc-bt-body { padding: 16px 18px 6px; flex: 1; }
.wmc-bt-addr {
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-variation-settings: 'wdth' 82;
  font-weight: 700; font-size: 21px; line-height: 1.1;
  text-transform: uppercase; letter-spacing: .005em;
  margin: 0; padding: 0; color: var(--wmcbt-ink);
}
.wmc-bt-nr { color: var(--wmcbt-accent); }
.wmc-bt-sub { color: var(--wmcbt-ink-soft); font-size: 12.5px; margin-top: 3px; }
.wmc-bt-note { margin-top: 8px; }
.wmc-bt-units { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--wmcbt-line); }
.wmc-bt-units li {
  display: flex; gap: 10px; justify-content: space-between; align-items: baseline;
  padding: 8px 0; margin: 0; border-bottom: 1px dashed var(--wmcbt-line); font-size: 13.5px;
}
.wmc-bt-units li:last-child { border-bottom: 0; }
.wmc-bt-uname { flex: 1; }
.wmc-bt-uroom { color: var(--wmcbt-ink-soft); font-size: 12px; }
.wmc-bt-ukad {
  display: block; color: var(--wmcbt-ink-soft); font-size: 11.5px;
  margin-top: 2px; font-variant-numeric: tabular-nums;
}
.wmc-bt-ustatuses { display: block; margin-top: 3px; }
.wmc-bt-ustatus {
  display: inline-block;
  font: 600 10.5px 'Inter', system-ui, sans-serif;
  padding: 2px 8px; border-radius: 999px; margin: 2px 4px 0 0;
}
.wmc-bt-uarea { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wmc-bt-unote { display: block; color: var(--wmcbt-ink-soft); font-size: 12px; margin-top: 2px; }

/* Kājene. Selektori ar paaugstinātu specifiku un !important teksta krāsai,
   lai tēmas saišu stili (piem., ".entry-content a") tos nepārrakstītu. */
.wmc-bt-foot { display: flex; gap: 8px; padding: 12px 18px 16px; }
.wmc-bt a.wmc-bt-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none;
  font: 600 13px 'Inter', system-ui, sans-serif;
  padding: 10px 8px; border-radius: 9px; transition: .15s;
  box-shadow: none; line-height: 1.2;
}
.wmc-bt-btn svg { flex: none; }
.wmc-bt a.wmc-bt-btn-map,
.wmc-bt a.wmc-bt-btn-map:visited,
.wmc-bt a.wmc-bt-btn-map:focus { background: var(--wmcbt-ink); color: #fff !important; border: 0; }
.wmc-bt a.wmc-bt-btn-map:hover { background: #324055; color: #fff !important; }
.wmc-bt a.wmc-bt-btn-gero,
.wmc-bt a.wmc-bt-btn-gero:visited,
.wmc-bt a.wmc-bt-btn-gero:focus { border: 1.5px solid var(--wmcbt-accent); color: var(--wmcbt-accent) !important; background: transparent; }
.wmc-bt a.wmc-bt-btn-gero:hover { background: var(--wmcbt-accent); color: #fff !important; }

.wmc-bt-empty { padding: 60px 0; text-align: center; color: var(--wmcbt-ink-soft); }
.wmc-bt-empty b { display: block; color: var(--wmcbt-ink); font-size: 17px; margin-bottom: 6px; }
.wmc-bt-empty[hidden] { display: none; }

@media (hover: none) { .wmc-bt-phnav { opacity: 1; } }

/* ---------- Lightbox (pievienots <body>, tāpēc ārpus .wmc-bt tvēruma) ---------- */
body.wmc-bt-lb-open { overflow: hidden; }
.wmc-bt-lb { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; }
.wmc-bt-lb[hidden] { display: none; }
.wmc-bt-lb-backdrop { position: absolute; inset: 0; background: rgba(15, 20, 28, .93); cursor: zoom-out; }
.wmc-bt-lb-figure {
  position: relative; margin: 0; z-index: 1;
  max-width: min(92vw, 1200px); max-height: 88vh;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  pointer-events: none;
}
.wmc-bt-lb-figure img {
  max-width: 100%; max-height: 80vh; width: auto; height: auto;
  object-fit: contain; border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  pointer-events: auto;
}
.wmc-bt-lb-figure figcaption { color: rgba(255, 255, 255, .88); font: 600 14.5px 'Inter', system-ui, sans-serif; text-align: center; }
.wmc-bt-lb button {
  position: absolute; z-index: 2; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .14); color: #fff;
  border-radius: 50%; transition: background .15s;
  font-family: 'Inter', system-ui, sans-serif; padding: 0; line-height: 1;
}
.wmc-bt-lb button:hover { background: rgba(255, 255, 255, .3); color: #fff; }
.wmc-bt-lb-close { top: 18px; right: 20px; width: 42px; height: 42px; font-size: 26px; }
.wmc-bt-lb-prev, .wmc-bt-lb-next { top: 50%; translate: 0 -50%; width: 46px; height: 46px; font-size: 30px; }
.wmc-bt-lb-prev { left: 16px; }
.wmc-bt-lb-next { right: 16px; }
.wmc-bt-lb-count {
  position: absolute; bottom: 16px; left: 0; right: 0; z-index: 1;
  text-align: center; color: rgba(255, 255, 255, .7);
  font: 500 12.5px 'Inter', system-ui, sans-serif;
}
@media (max-width: 600px) {
  .wmc-bt-lb-prev { left: 6px; }
  .wmc-bt-lb-next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .wmc-bt *, .wmc-bt *::before, .wmc-bt *::after,
  .wmc-bt-lb, .wmc-bt-lb * { transition: none !important; animation: none !important; }
}
