/* modal.css - Foundation for TruthWeb modals */

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.32);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--background, #fff);
  color: var(--text, #222);
  border-radius: 1.2rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  min-width: 25em;
  max-width: 30vw;
  padding: 2.2rem 2rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  animation: modal-pop 0.18s cubic-bezier(.4,2,.6,1) 1;
}
@keyframes modal-pop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-icon {
  font-size: 3em;
  color: var(--modal-icon, #2196f3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-icon.error { color: #e53935; }
.modal-icon.info { color: #2196f3; }
.modal-icon.success { color: #43a047; }
.modal-icon.warning { color: #fbc02d; }

.modal-message {
  display: flex;
  flex-direction: column;
  font-size: 18px;
  text-align: center;
  word-break: break-word;
  margin: 1em;
  justify-content: center;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: center;
}

.modal-btn {
  min-width: 90px;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 0.7rem;
  font-size: 1.08rem;
  font-weight: 500;
  cursor: pointer;
  background: #e0e0e0;
  color: #222;
  transition: background 0.15s, color 0.15s;
}
.modal-btn.ok, .modal-btn.confirm { background: #2196f3; color: #fff; }
.modal-btn.error { background: #e53935; color: #fff; }
.modal-btn.success { background: #43a047; color: #fff; }
.modal-btn.warning { background: #fbc02d; color: #fff; }
.modal-btn.deny, .modal-btn.cancel { background: #e0e0e0; color: #222; }
.modal-btn:hover { filter: brightness(0.95); }

@media screen and (max-width: 1299px) and (orientation: portrait){
  .modal-box {
      min-width: 25em;
      max-width: 50vw;
  }
}

@media screen and (max-width: 499px) and (orientation: portrait){
  .modal-box {
      min-width: 70vw;
      max-width: 70vw;
  }
}