/* POS box: country · language · currency (assets/js/pos.js) */
.pos {
  position: relative;
}

.pos-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 9px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: 'Comfortaa', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.pos-btn:hover {
  background: rgba(255, 255, 255, 0.11);
}

.pos-flag {
  display: inline-flex;
}

.pos-flag-img {
  display: block;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.pos-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pos-dot {
  color: var(--text-muted);
}

.pos-lang {
  color: var(--text-soft);
  font-weight: 600;
}

.pos-cur {
  color: var(--text);
}

.pos-caret {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Popover */
.pos-pop {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(11, 16, 34, 0.86);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text);
  z-index: 10000;
  text-align: left;
}

.pos.open .pos-pop {
  display: block;
}

.pos-ask {
  display: none;
  padding: 2px 2px 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pos.asking .pos-ask {
  display: block;
}

.pos.asking .pos-gps-inline {
  display: none;
}

.pos-q {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.pos-actions {
  display: flex;
  gap: 8px;
}

.pos-actions button,
.pos-gps-inline {
  flex: 1;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: 'Comfortaa', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.pos-actions .pos-yes {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pos-gps-inline {
  display: block;
  width: 100%;
  margin-top: 10px;
}

.pos-search {
  width: 100%;
  padding: 11px 14px 11px 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9bed0' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 12px center / 16px no-repeat;
  color: var(--text);
  font-family: 'Comfortaa', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
}

.pos-search:focus {
  border-color: rgba(45, 52, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(45, 52, 255, 0.18);
}

.pos-search::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}

.pos-list {
  margin-top: 10px;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.pos-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
}

.pos-item:hover,
.pos-item.active {
  background: rgba(255, 255, 255, 0.07);
}

.pos-item.selected {
  background: rgba(45, 52, 255, 0.18);
  outline: 1px solid rgba(45, 52, 255, 0.45);
}

.pos-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-item-cur {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.pos-divider {
  height: 1px;
  margin: 6px 4px;
  background: rgba(255, 255, 255, 0.1);
}

.pos-empty {
  padding: 14px 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.pos-meta {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
}

.pos-meta-label {
  display: inline-block;
  min-width: 72px;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pos-status {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 600;
}

.pos-status:empty {
  display: none;
}

/* Light mode */
body.light-mode .pos-btn {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(25, 27, 34, 0.12);
}

body.light-mode .pos-pop {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(25, 27, 34, 0.12);
}

body.light-mode .pos-search,
body.light-mode .pos-actions button:not(.pos-yes),
body.light-mode .pos-gps-inline {
  background-color: #f2f4fb;
  border-color: rgba(25, 27, 34, 0.12);
}

body.light-mode .pos-item:hover,
body.light-mode .pos-item.active {
  background: rgba(25, 27, 34, 0.05);
}

/* Small-print footer on demo pages */
.site-footer {
  margin-top: 40px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 4px;
}

.site-footer-licence,
.site-footer-meta {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.6;
}

.site-footer a {
  color: var(--text-soft);
  text-decoration: none;
}

.site-footer-fx {
  opacity: 0.8;
}

@media (max-width: 700px) {
  .pos-pop {
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 80vh;
    overflow-y: auto;
  }

  .pos-lang,
  .pos-lang + .pos-dot {
    display: none;
  }
}
