/* Modal Form  */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-card {
  background: #1a1a1a;
  border: 0.125em solid #ff4444;
  box-shadow: 0 0 1.25em rgba(255, 68, 68, 0.3);
  padding: 1.875em;
  border-radius: 0.5em;
  max-width: 28em;
  width: 90%;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
  color: #fff;
}

.modal-card h2 {
  color: #ff4444;
  margin-top: 0;
  font-size: 1.5em;
  letter-spacing: 0.0625em;
}

.modal-card p {
  color: #cccccc;
  line-height: 1.5;
  margin: 1.25em 0 1.875em 0;
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 1em;
}

.btn {
  padding: 0.75em 1.5em;
  border: none;
  border-radius: 0.25em;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s ease, filter 0.2s ease;

  display: flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  filter: brightness(1.2);
}

.btn:active {
  transform: scale(0.95);
}

.btn-safe {
  background: #00cc66;
  color: #000;
  font-size: 1.1em;
  flex-grow: 2;
  box-shadow: 0 0 0.9375em rgba(0, 204, 102, 0.4);
}

.btn-danger {
  background: #333333;
  color: #888888;
  font-size: 0.85em;
  flex-grow: 1;
  border: 0.0625em solid #555555;
}

.universal-card {
  border: 0.125em solid #4444ff;
  box-shadow: 0 0 1.25em rgba(68, 68, 255, 0.2);
}

/* OK */
.modal-buttons .btn-action,
.modal-buttons .btn-neutral {
  background: var(--btn-color, #333333);
  color: #ffffff;
  flex: 1;
  box-shadow: var(--btn-shadow, none);
}

/* Disabled state for buttons */
.btn:disabled,
.button:disabled:not(.w3-button) {
  background: #ccc !important;
  color: #666666 !important;
  border: 0.0625em solid #444444 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
  pointer-events: none;

  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}


.item-button:disabled:not(.w3-button) * {
  color: inherit !important;
}

/* Styled text input for the modal */
.game-input {
  display: block;
  width: 80%;
  margin: 0 auto 1.5em auto;
  padding: 0.6em 1em;
  background: #111111;
  border: 0.125em solid #4444ff;
  border-radius: 0.25em;
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1em;
  text-align: center;
  letter-spacing: 0.125em;
  outline: none;
  box-shadow: 0 0 0.5em rgba(68, 68, 255, 0.2);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.game-input:focus {
  border-color: #ff4444;
  box-shadow: 0 0 0.8em rgba(255, 68, 68, 0.4);
}