/* Mandatory in-game poll modal (ui/polls.js): Metin2 imperial look, strictly centered, PC + Mobile landscape */
#ui #poll-back {
  position: absolute; inset: 0; z-index: 9550;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 5, 4, .76);
  pointer-events: auto;
}
#ui #poll-back.hidden { display: none; }

#ui #poll-back #poll-win {
  position: relative; left: auto; top: auto;
  width: min(214px, calc(100% - 12px));
  max-height: calc(100% - 14px);
  display: flex; flex-direction: column;
}
#ui #poll-back #poll-win > .win-title {
  flex: none; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
#ui #poll-back #poll-win .poll-title-txt {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

#ui #poll-back #poll-win > .win-body.poll-body {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; gap: 5px;
  padding: 5px 6px 6px;
  overflow: hidden;
}

/* question header panel (.fp look) */
#ui #poll-win .poll-head {
  flex: none; display: flex; flex-direction: column; gap: 3px;
  padding: 5px 7px;
  background: linear-gradient(180deg, #1d1915, #120f0c);
  box-shadow: inset 0 0 0 1px #4a4236, 0 1px 0 #050403;
  max-height: 82px; overflow-y: auto; overflow-x: hidden;
}
#ui #poll-win .poll-badge-row {
  display: flex; align-items: center; justify-content: flex-start;
}
#ui #poll-win .poll-badge {
  display: inline-flex; align-items: center; padding: 1px 5px;
  font-size: 7px; line-height: 8px; letter-spacing: .3px;
  color: #f3dc9f; background: #2c2419;
  box-shadow: inset 0 0 0 1px #8c7447;
  text-shadow: var(--ol);
}
#ui #poll-win .poll-q {
  color: #f1e3bf; font-size: 9px; line-height: 11px;
  text-shadow: 0 1px 1px #000;
  overflow-wrap: anywhere;
}
#ui #poll-win .poll-desc {
  color: #b7b2a2; font-size: 7px; line-height: 9px;
  white-space: pre-line; overflow-wrap: anywhere;
}

/* scrollable options list */
#ui #poll-win .poll-opts {
  flex: 1 1 auto; min-height: 36px;
  display: flex; flex-direction: column; gap: 3px;
  overflow-y: auto; overflow-x: hidden;
  padding: 1px 1px 2px;
}
#ui #poll-win .poll-opt {
  flex: none; width: 100%; min-height: 17px;
  display: flex; align-items: center; gap: 5px;
  padding: 3px 6px; margin: 0; border: 0;
  font-family: var(--font); font-size: 8px; line-height: 10px; text-align: left;
  color: #e4ddc9; white-space: normal;
  background: linear-gradient(#26231f, #181613);
  box-shadow: 0 0 0 1px #060504, inset 0 0 0 1px #4f483b;
  text-shadow: 0 1px 0 #000;
  box-sizing: border-box;
}
#ui #poll-win .poll-opt:hover {
  background: linear-gradient(#342f28, #211e1a);
  box-shadow: 0 0 0 1px #060504, inset 0 0 0 1px #9c8657;
  color: #fff2ce;
}
#ui #poll-win .poll-opt.picked {
  background: linear-gradient(#423828, #282118);
  box-shadow: 0 0 0 1px #060504, inset 0 0 0 1px #d7b66e, inset 2px 0 0 #e6c67b;
  color: #fff5d6;
}
#ui #poll-win .poll-radio {
  flex: none; width: 8px; height: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #0d0b09;
  box-shadow: inset 0 0 0 1px #7d6d4e;
}
#ui #poll-win .poll-radio i {
  display: block; width: 4px; height: 4px; border-radius: 50%;
  background: transparent;
}
#ui #poll-win .poll-opt.picked .poll-radio {
  box-shadow: inset 0 0 0 1px #e2c27a;
}
#ui #poll-win .poll-opt.picked .poll-radio i {
  background: #f0cf7b;
}
#ui #poll-win .poll-lbl {
  flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;
}

/* footer pinned at bottom */
#ui #poll-win .poll-foot {
  flex: none; display: flex; flex-direction: column; gap: 3px;
  padding-top: 2px;
  border-top: 1px solid #3c362c;
}
#ui #poll-win .poll-err {
  color: #ef8a7e; font-size: 7px; line-height: 9px; text-align: center;
  padding: 2px 4px; background: rgba(95, 24, 18, .45);
  box-shadow: inset 0 0 0 1px #7d362d;
  overflow-wrap: anywhere;
}
#ui #poll-win .poll-note {
  color: #a9a494; font-size: 7px; line-height: 9px; text-align: center;
  padding: 0 3px; overflow-wrap: anywhere;
}
#ui #poll-win .poll-submit {
  width: 100%; height: 17px; padding: 0 8px;
  font-size: 8px; line-height: 10px;
}

/* Mobile landscape & touch: >= 44 CSS-px tap targets, wider modal, scrollable options */
html.touch #ui #poll-back #poll-win {
  width: min(296px, calc((100% - 10px) / var(--wz)));
  max-height: calc((100% - 8px) / var(--wz));
}
html.touch #ui #poll-back #poll-win > .win-body.poll-body {
  overflow: hidden;
  padding: 4px 6px 5px;
  gap: 4px;
}
html.touch #ui #poll-back #poll-win .poll-head {
  padding: 4px 6px;
  max-height: 52px;
}
html.touch #ui #poll-back #poll-win .poll-opts {
  min-height: 44px;
  gap: 3px;
}
html.touch #ui #poll-back #poll-win .poll-opt {
  min-height: calc(44px / (var(--px) * var(--wz)));
  padding: 3px 6px;
  font-size: 8px; line-height: 10px;
}
html.touch #ui #poll-back #poll-win .poll-submit {
  height: calc(44px / (var(--px) * var(--wz)));
  min-height: calc(44px / (var(--px) * var(--wz)));
}
html.touch #ui #poll-back #poll-win .poll-note {
  display: none;
}
