/* comments.exe: a Windows 2000 dialog rebuilt in the site's chrome / navy language.
   Mounted by comments-window.js into [data-comments-window]. */

.comments-window-mount {
  position: relative;
  max-width: 100%;
}

.cw {
  --cw-face: #d4d0c8;
  --cw-hi: #ffffff;
  --cw-lite: #e9e7e2;
  --cw-shade: #808080;
  --cw-dark: #404040;
  --cw-navy: #070b1a;
  --cw-ink: #0a0f24;
  --cw-lime: #caff3d;
  --cw-cobalt: #2f5bff;
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: min(100%, 470px);
  min-width: min(320px, 100%);
  min-height: 300px;
  padding: 3px;
  color: var(--cw-ink);
  font: 400 13px/1.4 Tahoma, Verdana, "Segoe UI", system-ui, sans-serif;
  text-align: start;
  background: linear-gradient(180deg, #f1f3f7 0%, var(--cw-face) 38%, #b9bcc4 100%);
  border: 1px solid;
  border-color: var(--cw-lite) var(--cw-dark) var(--cw-dark) var(--cw-lite);
  box-shadow:
    inset 1px 1px 0 var(--cw-hi),
    inset -1px -1px 0 var(--cw-shade),
    0 22px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(3, 3, 3, 0.65);
}

.cw.is-dragging {
  box-shadow:
    inset 1px 1px 0 var(--cw-hi),
    inset -1px -1px 0 var(--cw-shade),
    0 30px 70px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(202, 255, 61, 0.6);
  user-select: none;
}

/* Title bar */
.cw__titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 3px 2px 5px;
  color: #ffffff;
  background: linear-gradient(90deg, #0a246a 0%, #1e48c8 48%, #a6caf0 100%);
  touch-action: auto;
}

.cw.is-draggable .cw__titlebar {
  cursor: move;
  touch-action: none;
}

.cw__appicon {
  flex: none;
  width: 14px;
  height: 10px;
  border-radius: 3px;
  background: #ff1648;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
  position: relative;
}

.cw__appicon::after {
  position: absolute;
  top: 2.5px;
  left: 5.5px;
  width: 4px;
  height: 5px;
  content: "";
  background: #ffffff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.cw__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font: 700 12px/1 Tahoma, Verdana, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.cw__controls {
  display: flex;
  flex: none;
  gap: 2px;
}

.cw__ctl {
  position: relative;
  width: 17px;
  height: 15px;
  background: linear-gradient(180deg, #ffffff 0%, #dfe3ea 45%, #a9afba 55%, #eef1f6 100%);
  border: 1px solid;
  border-color: var(--cw-hi) var(--cw-dark) var(--cw-dark) var(--cw-hi);
  box-shadow: inset -1px -1px 0 var(--cw-shade);
}

.cw__ctl::before,
.cw__ctl::after {
  position: absolute;
  content: "";
  background: #111317;
}

.cw__ctl--min::before { left: 4px; bottom: 3px; width: 6px; height: 2px; }
.cw__ctl--max::before { top: 2px; left: 3px; width: 7px; height: 6px; background: transparent; border: 1px solid #111317; border-top-width: 2px; }
.cw__ctl--max::after { display: none; }
.cw__ctl--close { margin-left: 2px; }
.cw__ctl--close::before,
.cw__ctl--close::after { top: 6px; left: 3px; width: 9px; height: 1.6px; }
.cw__ctl--close::before { transform: rotate(45deg); }
.cw__ctl--close::after { transform: rotate(-45deg); }

/* Menu strip */
.cw__menu {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 3px 6px 2px;
  font-size: 12px;
  color: #1b1f2b;
  list-style: none;
}

.cw__menu li::first-letter {
  text-decoration: underline;
}

/* Client area */
.cw__body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  margin: 2px 2px 4px;
  padding: 12px;
  overflow: hidden;
  color: #e9edf7;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 85% 0%, rgba(47, 91, 255, 0.28), transparent 55%),
    var(--cw-navy);
  border: 1px solid;
  border-color: var(--cw-shade) var(--cw-hi) var(--cw-hi) var(--cw-shade);
  box-shadow: inset 1px 1px 0 var(--cw-dark);
}

.cw__post {
  margin: 0;
  color: #9aa6c4;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.cw__post a {
  color: var(--cw-lime);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cw__post a:focus-visible,
.cw__btn:focus-visible {
  outline: 2px dotted var(--cw-lime);
  outline-offset: 2px;
}

.cw__msg {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: 0;
}

.cw__msg--reply {
  margin-inline-start: 22px;
}

.cw__bubble {
  min-width: 0;
  padding: 7px 10px 8px;
  color: var(--cw-ink);
  background: #f4f1ea;
  border: 1px solid;
  border-color: var(--cw-hi) var(--cw-shade) var(--cw-shade) var(--cw-hi);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.cw__msg--reply .cw__bubble {
  background: linear-gradient(180deg, #ffffff, #e8edf8);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35), inset 3px 0 0 #ff1648;
}

.cw__who {
  display: block;
  margin-bottom: 2px;
  color: #3b4257;
  font-size: 11px;
  font-weight: 700;
}

.cw__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}

.cw__text[lang="ar"],
.cw__text:lang(ar) {
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 17px;
}

.cw__tr {
  margin: 4px 0 0;
  color: #5b6276;
  font-size: 11.5px;
  font-style: italic;
  unicode-bidi: plaintext;
}

.cw__tr:empty,
.cw__alt:empty {
  display: none;
}

.cw__typed.is-typing::after {
  display: inline-block;
  width: 0.5ch;
  margin-inline-start: 1px;
  content: "";
  height: 1em;
  vertical-align: -0.12em;
  background: #ff1648;
  animation: cw-caret 0.8s steps(2, jump-none) infinite;
}

@keyframes cw-caret {
  50% { opacity: 0; }
}

/* Avatars: CSS-drawn, no images, no identities. */
.cw__avatar {
  position: relative;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.cw__avatar--fan {
  background:
    radial-gradient(circle at 50% 38%, #c9ced8 0 5.5px, transparent 6px),
    radial-gradient(ellipse 11px 8px at 50% 100%, #c9ced8 0 98%, transparent 100%),
    linear-gradient(160deg, #4a5068, #1d2233);
}

.cw__avatar--yt {
  background: #ffffff;
}

.cw__avatar--yt::before {
  position: absolute;
  top: 8px;
  left: 5px;
  width: 18px;
  height: 12.5px;
  content: "";
  border-radius: 4px;
  background: #ff0033;
}

.cw__avatar--yt::after {
  position: absolute;
  top: 11px;
  left: 12px;
  width: 6px;
  height: 7px;
  content: "";
  background: #ffffff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Status bar */
.cw__status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
}

.cw__btn {
  min-width: 64px;
  min-height: 24px;
  padding: 2px 10px;
  color: #111317;
  font: 400 12px/1 Tahoma, Verdana, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, var(--cw-face) 60%, #c3c6ce 100%);
  border: 1px solid;
  border-color: var(--cw-hi) var(--cw-dark) var(--cw-dark) var(--cw-hi);
  box-shadow: inset -1px -1px 0 var(--cw-shade), inset 1px 1px 0 var(--cw-lite);
}

.cw__btn:active:not(:disabled) {
  border-color: var(--cw-dark) var(--cw-hi) var(--cw-hi) var(--cw-dark);
  box-shadow: inset 1px 1px 0 var(--cw-shade);
  transform: translate(1px, 1px);
}

.cw__btn:disabled {
  color: var(--cw-shade);
  text-shadow: 1px 1px 0 var(--cw-hi);
  cursor: default;
}

.cw__count,
.cw__state {
  padding: 3px 8px;
  border: 1px solid;
  border-color: var(--cw-shade) var(--cw-hi) var(--cw-hi) var(--cw-shade);
  font: 400 11.5px/1.2 Tahoma, Verdana, "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cw__state {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #3b4257;
  text-overflow: ellipsis;
}

.cw-offline {
  margin: 0;
  color: #9aa6c4;
  font: 400 11px/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.cw-offline::before {
  content: "\25CF  ";
  color: #ff1648;
}

.cw__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Mobile and touch: static, full width of the mount. */
@media (max-width: 720px), (hover: none), (pointer: coarse) {
  .cw {
    width: 100%;
    translate: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cw__typed.is-typing::after {
    animation: none;
  }
}
