/* Tibia-style VIP List: compact desktop rows, 12px type icons and native window controls. */
.vipListPanel {
  border: 1px solid #59616a;
  border-radius: 3px;
  background: linear-gradient(180deg, #252a30, #171b20);
  color: #d8d8d8;
}

.vipListPanel .hubInventoryHeader {
  min-height: 20px;
}

.vipListHeaderMenu {
  position: absolute;
  top: 2px;
  right: 25px;
  width: 18px;
  height: 17px;
  padding: 0;
  border: 1px solid #555d65;
  border-radius: 2px;
  background: #252b31;
  color: #d4d8dc;
  font: 700 12px/15px Verdana, sans-serif;
}

.vipListBody {
  display: grid;
  grid-template-rows: 22px minmax(0, 1fr);
  min-height: 80px;
  padding: 2px;
  background: #181c20;
}

.vipListToolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 1px 2px;
  border-bottom: 1px solid #42484e;
}

.vipListToolbar button {
  width: 22px;
  height: 18px;
  min-width: 22px;
  padding: 0;
  border: 1px solid #565d64;
  border-radius: 2px;
  background: linear-gradient(#343b42, #23282d);
  color: #e7e7e7;
  font: 700 10px/16px Verdana, sans-serif;
}

.vipListToolbar button:hover,
.vipListHeaderMenu:hover {
  border-color: #858f99;
  background: #3d454c;
}

.vipListCounter {
  margin-left: auto;
  padding-right: 3px;
  color: #9ca4ab;
  font: 400 10px/1 Verdana, sans-serif;
}

.vipListRows {
  min-height: 0;
  max-height: 260px;
  overflow: auto;
  padding: 1px 0;
  background: #101316;
  scrollbar-width: thin;
}

.vipListRow {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 2px;
  min-height: 16px;
  height: 16px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  cursor: default;
  user-select: none;
}

.vipListRow:hover {
  background: #34404a;
}

.vipTypeIcon {
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
  color: #c9cdd1;
  font: 700 10px/12px Verdana, sans-serif;
  text-align: center;
}

.vipListName {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 400 11px/15px Verdana, sans-serif;
  text-rendering: geometricPrecision;
}

.vipNotifyIcon {
  color: #ffca38;
  font: 700 10px/1 Verdana, sans-serif;
  text-align: center;
}

.vipGroupHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 18px;
  padding: 0 4px;
  border-top: 1px solid #454b51;
  border-bottom: 1px solid #252a2f;
  background: #2a3036;
  color: #d7dadd;
  font: 700 10px/17px Verdana, sans-serif;
  user-select: none;
}

.vipGroupHeader small {
  color: #929aa1;
  font: 400 9px/1 Verdana, sans-serif;
}

.vipGroupHeader.ungrouped {
  color: #aeb4b9;
}

.vipListEmpty {
  padding: 8px 5px;
  color: #92999f;
  font: 400 11px/1.2 Verdana, sans-serif;
  text-align: center;
}

.vipContextMenu {
  position: fixed;
  inset: auto;
  z-index: 2147483645;
  display: grid;
  min-width: 182px;
  margin: 0;
  padding: 2px;
  border: 1px solid #727980;
  border-radius: 2px;
  background: #202429;
  box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.7);
}

.vipContextMenu button {
  height: 20px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: #dedede;
  text-align: left;
  font: 400 11px/19px Verdana, sans-serif;
}

.vipContextMenu button:hover:not(:disabled) {
  background: #38536a;
}

.vipContextMenu button:disabled {
  color: #656b70;
}

.vipContextMenu hr {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  border: 0;
  background: #4b5157;
}

.vipModalOverlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  width: 100vw;
  height: 100vh;
  margin: 0;
  place-items: center;
  padding: 12px;
  border: 0;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.58);
}

.vipModal {
  width: min(330px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  overflow: auto;
  padding: 5px;
  border: 1px solid #747c83;
  border-radius: 3px;
  background: #20252a;
  color: #d8dadd;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.78);
  font: 400 11px/1.25 Verdana, sans-serif;
}

.vipModalTitle {
  margin: -5px -5px 6px;
  padding: 4px 7px;
  border-bottom: 1px solid #555c63;
  background: #30363c;
  font-weight: 700;
}

.vipModalContents {
  display: grid;
  gap: 7px;
}

.vipModalContents > label {
  display: grid;
  gap: 3px;
}

.vipModal input:not([type="checkbox"]),
.vipModal textarea,
.vipModal select {
  width: 100%;
  min-height: 24px;
  padding: 3px 5px;
  border: 1px solid #545c63;
  border-radius: 2px;
  background: #111519;
  color: #e4e6e8;
  font: 400 11px/1.25 Verdana, sans-serif;
}

.vipModal textarea {
  resize: vertical;
}

.vipModalCheck {
  display: flex !important;
  align-items: center;
  gap: 5px;
}

.vipModalGroups {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 6px;
  border: 1px solid #4c5359;
}

.vipModalHint {
  color: #8f979e;
}

.vipModalActions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 8px;
}

.vipModalActions button {
  min-width: 72px;
  height: 24px;
  border: 1px solid #596169;
  border-radius: 2px;
  background: #30363c;
  color: #e2e4e6;
  font: 400 11px/1 Verdana, sans-serif;
}

.vipModalActions button.primary {
  border-color: #657f55;
  background: #354a2d;
}

body.mobile-ui .vipModal {
  width: min(430px, calc(100vw - 18px));
  max-height: calc(100vh - 18px);
  padding: 9px;
  font-size: 13px;
}

body.mobile-ui .vipModal input:not([type="checkbox"]),
body.mobile-ui .vipModal textarea,
body.mobile-ui .vipModal select,
body.mobile-ui .vipModalActions button {
  min-height: 38px;
  font-size: 13px;
}

body:not(.mobile-ui) .vipListPanel .vipListHeaderMenu {
  position: absolute !important;
  top: 2px !important;
  right: 45px !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 17px !important;
  min-height: 17px !important;
  padding: 0 !important;
  border: 1px solid #59626a !important;
  border-radius: 2px !important;
  background: #242a30 !important;
  color: #e1e4e7 !important;
  font: 700 12px/15px Verdana, sans-serif !important;
  box-shadow: none !important;
}

body:not(.mobile-ui) .vipListPanel .vipListToolbar button {
  width: 22px !important;
  min-width: 22px !important;
  height: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  border: 1px solid #565d64 !important;
  border-radius: 2px !important;
  background: linear-gradient(#343b42, #23282d) !important;
  color: #e7e7e7 !important;
  font: 700 10px/16px Verdana, sans-serif !important;
  box-shadow: none !important;
}

/* VIP List interaction pass: Tibia contract with a clearer RoR presentation. */
.vipListPanel {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-color: #6f7780;
  background:
    linear-gradient(180deg, rgba(48, 54, 61, 0.98), rgba(20, 24, 29, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.3);
}

.vipListBody {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-self: stretch;
  justify-self: stretch;
  grid-template-rows: 30px minmax(0, 1fr);
  padding: 3px;
  background:
    radial-gradient(circle at 50% -10%, rgba(111, 151, 187, 0.12), transparent 48%),
    #12161a;
}

.vipListToolbar {
  gap: 3px;
  padding: 3px;
  border: 1px solid #424b54;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #30373e, #22282e);
}

body:not(.mobile-ui) .vipListPanel .vipListToolbar .vipToolbarAction {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  width: auto !important;
  min-width: 48px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 6px !important;
  border-color: #58636d !important;
  border-radius: 3px !important;
  color: #dce3e9 !important;
  font: 700 10px/20px Verdana, sans-serif !important;
}

body:not(.mobile-ui) .vipListPanel .vipListToolbar .vipToolbarAction.primary {
  border-color: #71845b !important;
  background: linear-gradient(#455839, #2a3824) !important;
  color: #e9f6dc !important;
}

.vipToolbarGlyph {
  color: #ffd777;
  font: 700 13px/1 Verdana, sans-serif;
}

.vipListCounter {
  min-width: 36px;
  padding: 3px 4px;
  border: 1px solid #464f57;
  border-radius: 8px;
  background: #171b1f;
  color: #b9c1c8;
  text-align: center;
}

.vipListRows {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-self: stretch;
  justify-self: stretch;
  max-height: 330px;
  padding: 2px;
  border: 1px solid #343b42;
  border-top: 0;
  background:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px) 0 0 / 100% 29px,
    #0e1114;
}

.vipListRow {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  align-self: stretch;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  gap: 5px;
  height: 31px;
  min-height: 31px;
  margin-bottom: 1px;
  padding: 2px 5px 2px 3px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}

.vipListRow:hover,
.vipListRow:focus-visible {
  border-color: #4f687b;
  outline: 0;
  background: linear-gradient(90deg, rgba(61, 91, 114, 0.7), rgba(40, 56, 67, 0.46));
}

.vipListRow.selected {
  border-color: #9f8041;
  background: linear-gradient(90deg, rgba(112, 80, 30, 0.7), rgba(55, 44, 27, 0.5));
  box-shadow: inset 2px 0 0 #e4b85a;
}

.vipTypeIcon {
  width: 22px;
  height: 22px;
  border: 1px solid #505961;
  border-radius: 4px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,0.14), transparent 35%),
    linear-gradient(#333b42, #1c2227);
  color: #e2e7eb;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}

.vipIdentifierImage {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.vipIdentifierFallback {
  display: none;
}

.vipRowContent {
  display: grid;
  min-width: 0;
  line-height: 1;
}

.vipListName {
  font-weight: 700;
  line-height: 14px;
}

.vipRowMeta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: #8e979f;
  font: 400 9px/11px Verdana, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vipStateDot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #f75f5f;
  box-shadow: 0 0 4px rgba(247, 95, 95, 0.65);
}

.vipListRow.online .vipStateDot {
  background: #5ff75f;
  box-shadow: 0 0 5px rgba(95, 247, 95, 0.78);
}

.vipListRow.pending .vipStateDot {
  background: #ffca38;
  box-shadow: 0 0 5px rgba(255, 202, 56, 0.72);
}

.vipNotifyIcon,
.vipRowChevron {
  color: #ffca38;
  font: 700 11px/1 Verdana, sans-serif;
}

.vipRowChevron {
  color: #66717a;
  font-size: 16px;
}

.vipGroupHeader {
  height: 22px;
  margin: 3px 0 1px;
  padding: 0 6px;
  border: 1px solid #4a535b;
  border-radius: 3px;
  background: linear-gradient(180deg, #333a41, #252b31);
  color: #e1e5e8;
  cursor: pointer;
}

.vipGroupHeader:hover,
.vipGroupHeader:focus-visible {
  border-color: #77848e;
  outline: 0;
}

.vipGroupHeader > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.vipGroupHeader > span i {
  width: 9px;
  color: #d6ad59;
  font-style: normal;
}

.vipListEmpty {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 16px 10px;
  color: #aab2b9;
}

.vipListEmpty .vipEmptyIcon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #59636c;
  border-radius: 50%;
  background: radial-gradient(circle, #36414a, #1a2025);
  color: #ffd777;
  font-size: 21px;
}

.vipListEmpty strong {
  color: #e2e6e9;
  font-size: 11px;
}

.vipListEmpty small {
  max-width: 190px;
  color: #87919a;
  font-size: 9px;
}

.vipListEmpty button {
  min-height: 22px;
  border: 1px solid #71845b;
  border-radius: 3px;
  background: linear-gradient(#455839, #2a3824);
  color: #edf7e4;
  font: 700 10px Verdana, sans-serif;
}

.vipModal {
  width: min(390px, calc(100vw - 24px));
  padding: 0;
  border-color: #77818a;
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 0, rgba(104, 142, 174, 0.12), transparent 35%),
    #1b2025;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.84), inset 0 1px 0 rgba(255,255,255,0.07);
}

.vipModalTitle {
  margin: 0;
  padding: 9px 12px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #394149, #282e34);
  color: #eef1f3;
  font: 700 12px Verdana, sans-serif;
}

.vipModalContents {
  gap: 9px;
  padding: 10px 11px 4px;
}

.vipEditorPreview,
.vipGroupEditorHero {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px;
  border: 1px solid #4c5963;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(51, 65, 76, 0.9), rgba(26, 32, 38, 0.94));
}

.vipEditorPreviewIcon,
.vipGroupEditorHero > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #79838b;
  border-radius: 6px;
  background: radial-gradient(circle at 35% 25%, #53606a, #242a30);
  color: #ffd777;
  font-size: 18px;
}

.vipEditorPreviewIcon .vipIdentifierImage {
  width: 31px;
  height: 31px;
}

.vipEditorPreviewText,
.vipGroupEditorHero > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.vipEditorPreviewText strong,
.vipGroupEditorHero strong {
  overflow: hidden;
  color: #f0f3f5;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vipEditorPreviewText small,
.vipGroupEditorHero small {
  color: #97a1aa;
  font-size: 9px;
}

.vipEditorPreviewState {
  padding: 3px 5px;
  border: 1px solid #5a744d;
  border-radius: 8px;
  background: #263922;
  color: #82ee73;
  font: 700 9px Verdana, sans-serif;
}

.vipEditorSection {
  position: relative;
  padding: 8px;
  border: 1px solid #414a52;
  border-radius: 5px;
  background: rgba(10, 13, 16, 0.42);
}

.vipEditorSectionTitle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.vipEditorSectionTitle span,
.vipEditorField > span {
  color: #dce1e5;
  font-weight: 700;
}

.vipEditorSectionTitle small {
  color: #7f8a93;
  font-size: 9px;
}

.vipIconPicker {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 2px;
}

.vipIconChoice {
  display: grid;
  place-items: center;
  gap: 1px;
  min-width: 0;
  height: 34px;
  padding: 1px;
  border: 1px solid #4e5860;
  border-radius: 3px;
  background: linear-gradient(#323a41, #20262b);
  color: #cfd5da;
}

.vipIconChoice span {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  font: 700 12px/14px Verdana, sans-serif;
}

.vipIconChoice .vipIdentifierImage {
  width: 22px;
  height: 22px;
}

.vipIconChoice small {
  color: #737e87;
  font: 400 7px/8px Verdana, sans-serif;
}

.vipIconChoice:hover,
.vipIconChoice.selected {
  border-color: #d0a64f;
  background: linear-gradient(#64502a, #332918);
  color: #fff0b8;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 119, 0.2);
}

.vipEditorField {
  display: grid;
  gap: 4px;
}

.vipNameField {
  padding: 8px;
  border: 1px solid #414a52;
  border-radius: 5px;
  background: rgba(10, 13, 16, 0.42);
}

.vipDescriptionCounter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #73808a;
  font-size: 8px;
}

.vipNotifyToggle {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px !important;
  padding: 7px 8px;
  border: 1px solid #414a52;
  border-radius: 5px;
  background: #171c20;
  cursor: pointer;
}

.vipNotifyToggle > input {
  position: absolute;
  opacity: 0;
}

.vipToggleTrack {
  position: relative;
  width: 28px;
  height: 14px;
  border: 1px solid #58626a;
  border-radius: 8px;
  background: #272d32;
}

.vipToggleTrack::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #929ba3;
  transition: transform 120ms ease, background 120ms ease;
}

.vipNotifyToggle > input:checked + .vipToggleTrack {
  border-color: #638552;
  background: #2a4123;
}

.vipNotifyToggle > input:checked + .vipToggleTrack::after {
  transform: translateX(14px);
  background: #84ec72;
}

.vipNotifyToggle > span:last-child {
  display: grid;
  gap: 2px;
}

.vipNotifyToggle strong { color: #dce2e6; font-size: 10px; }
.vipNotifyToggle small { color: #7f8a93; font-size: 8px; }

.vipModalGroups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 7px;
  border-color: #414a52;
  border-radius: 5px;
}

.vipModalGroups legend {
  padding: 0 4px;
  color: #aab3ba;
  font-weight: 700;
}

.vipGroupChoice {
  display: flex !important;
  align-items: center;
  gap: 4px !important;
  min-height: 24px;
  padding: 3px 5px;
  border: 1px solid #3e474e;
  border-radius: 3px;
  background: #171b1f;
  color: #cbd1d6;
}

.vipGroupChoice:has(input:checked) {
  border-color: #9d7d3d;
  background: #332a1a;
  color: #ffe8aa;
}

.vipGroupEditorContents {
  min-height: 150px;
}

.vipGroupEditorHero {
  grid-template-columns: 38px minmax(0, 1fr);
}

.vipGroupEditorHint {
  padding: 7px;
  border-left: 2px solid #b99143;
  background: rgba(126, 92, 31, 0.13);
  color: #aeb7be;
  font-size: 9px;
}

.vipModalActions {
  margin: 5px 11px 10px;
  padding-top: 8px;
  border-top: 1px solid #414950;
}

.vipModalActions button {
  min-width: 82px;
  height: 27px;
  border-radius: 4px;
}

.vipModalActions button.primary {
  border-color: #79915f;
  background: linear-gradient(#4d633e, #2d3c26);
  color: #eff9e8;
}

@media (max-width: 520px) {
  .vipIconPicker {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .vipModalGroups {
    grid-template-columns: 1fr;
  }

  body.mobile-ui .vipModal {
    width: min(460px, calc(100vw - 14px));
    padding: 0;
  }
}
