/* RAWDM cosmetics — name lines, flags, founder tag, country picker modal.
   ZIGGURAT system: square, solid, no blur. Loaded on every page (incl. /play). */

.rawdm-name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rawdm-flag {
  width: 18px;
  height: 13px;
  border: 1px solid rgba(255, 255, 255, .18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .08);
  font-size: 14px;
  line-height: 1;
}
.rawdm-flag .fi {
  width: 100%;
  height: 100%;
  background-size: cover;
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
}
.rawdm-tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 160px;
  margin-top: 3px;
  padding: 2px 7px;
  border: var(--line-flat, 1px solid rgba(255, 255, 255, .13));
  background: var(--g2, rgba(255, 255, 255, .055));
  color: var(--prose, #cbd5e1);
  font: 700 9px/1.35 var(--font-ui, Arial, sans-serif);
  text-transform: uppercase;
  letter-spacing: .09em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rawdm-tag.founder {
  color: #dff8ff;
  border-color: rgba(56, 189, 248, .56);
  background: #10333d;
  animation: rawdmFounderGlow 2.4s ease-in-out infinite;
}

/* Country onboarding modal: a raised bevel panel on a dimmed void. */
.rawdm-country-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(4, 5, 7, .82);
  animation: rawdmFadeIn .18s ease both;
}
.rawdm-country-card {
  width: min(720px, calc(100vw - 34px));
  max-height: min(760px, calc(100vh - 34px));
  overflow: hidden;
  background: var(--g3);
  border: var(--bv) solid;
  border-color: var(--hi) var(--lo) var(--lo) var(--hi);
  padding: 24px;
  animation: rawdmModalIn .32s cubic-bezier(.2, .9, .22, 1) both;
}
.rawdm-country-card h2 {
  margin: 0;
  font: 700 clamp(28px, 4vw, 44px)/.95 var(--font-display, Impact, sans-serif);
  letter-spacing: .04em;
  color: var(--signal, #fff);
  text-transform: uppercase;
}
.rawdm-country-card p {
  margin: 10px 0 18px;
  color: var(--prose, #cbd5e1);
  font: 400 13px/1.5 var(--font-ui, Arial, sans-serif);
}
.rawdm-country-search {
  width: 100%;
  box-sizing: border-box;
  border: var(--line-well, 1px dotted rgba(255, 255, 255, .2));
  background: var(--g1, rgba(2, 6, 12, .72));
  color: var(--signal, #fff);
  padding: 12px 13px;
  font: 700 13px var(--font-ui, Arial, sans-serif);
  outline: none;
}
.rawdm-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 9px;
  margin-top: 14px;
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}
.rawdm-country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: var(--line-flat, 1px solid rgba(255, 255, 255, .1));
  background: var(--g2, rgba(255, 255, 255, .045));
  color: var(--prose, #e5edf5);
  padding: 10px 12px;
  font: 700 12px var(--font-ui, Arial, sans-serif);
  cursor: pointer;
}
.rawdm-country-option:hover,
.rawdm-country-option.selected {
  border-color: var(--edge-hot, rgba(255, 255, 255, .3));
  background: var(--g4, rgba(255, 255, 255, .1));
  color: var(--signal, #fff);
}
.rawdm-country-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.rawdm-country-actions button {
  border: var(--bv-sm, 2px) solid;
  border-color: var(--hi, #888) var(--lo, #000) var(--lo, #000) var(--hi, #888);
  background: var(--g4, rgba(255, 255, 255, .06));
  color: var(--signal, #fff);
  padding: 11px 16px;
  font: 700 12px var(--font-ui, Arial, sans-serif);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.rawdm-country-actions button:active {
  border-color: var(--lo, #000) var(--hi, #888) var(--hi, #888) var(--lo, #000);
  transform: translate(1px, 1px);
}
.rawdm-country-actions .primary {
  background: var(--red-face, #7a1620);
  border-color: var(--red-hi, #d96a5e) var(--red-lo, #220306) var(--red-lo, #220306) var(--red-hi, #d96a5e);
  color: #ffe9e6;
}
.rawdm-country-actions .primary:hover { background: var(--red-face-hot, #971724); }
.rawdm-country-actions button:disabled { opacity: .48; cursor: not-allowed; }
.rawdm-profile-country-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}
.rawdm-flag-settings {
  margin: 10px 0 0;
  padding: 12px;
  border: var(--line-flat, 1px solid rgba(255, 255, 255, .12));
  background: var(--g2, rgba(255, 255, 255, .045));
}

@keyframes rawdmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rawdmModalIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rawdmFounderGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.28); } }
