/* ==========================================================================
   GLOBAL IN-GAME MODAL DIALOG SYSTEM (CUSTOM ALERT / CONFIRM / SELECTION)
   ========================================================================== */
.game-global-modal-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(4, 7, 14, 0.88) !important;
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
  box-sizing: border-box;
  pointer-events: auto !important;
}

.game-modal-dialog-box {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  border-radius: 18px;
  width: 500px;
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 2147483647 !important;
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
  pointer-events: auto !important;
}

.gm-dialog-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gm-dialog-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gm-dialog-icon {
  font-size: 24px;
}
.gm-dialog-title {
  margin: 0;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

.gm-dialog-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gm-dialog-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.gm-dialog-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* AGENTS.md §4.3: pencere içi ölçü — vh/vw DEĞİL (onlar tarayıcıyı ölçer), yüzde. */
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.gm-dialog-message {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.5;
  white-space: pre-line;
}

.gm-dialog-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.btn-gm-cancel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-gm-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-gm-confirm {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transition: all 0.15s ease;
}
.btn-gm-confirm:hover {
  background: #0ea5e9;
  transform: translateY(-1px);
}
.btn-gm-confirm.gold {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #fbbf24;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}
.btn-gm-confirm.danger {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  border-color: #f87171;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* Custom list items inside modal */
.gm-selection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gm-selection-item {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gm-selection-item:hover {
  border-color: #38bdf8;
  background: rgba(51, 65, 85, 0.9);
  transform: translateX(4px);
}
.gm-selection-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gm-selection-item-name {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
}
.gm-selection-item-desc {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11.5px;
  color: #38bdf8;
}

.gm-prompt-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid #38bdf8;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
.gm-prompt-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  background: #0f172a;
}
