.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.modal.is-open {
  display: block;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(10, 10, 10, 0.5);
}

.modal__panel {
  position: relative;
  max-width: 480px;
  margin: 4rem auto;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2.5rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted);
}

.modal__subtitle {
  color: var(--color-muted);
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal__form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.modal__form input,
.modal__form select,
.modal__form textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
}

.modal__form button {
  margin-top: 0.5rem;
}

.modal__status {
  font-size: 0.875rem;
  padding: 0.75rem 0.9rem;
  border-radius: 4px;
  margin: 0;
}

.modal__status--success {
  color: #1a7f37;
  background-color: rgba(26, 127, 55, 0.08);
  border: 1px solid rgba(26, 127, 55, 0.25);
}

.modal__status--error {
  color: #c0392b;
  background-color: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
}

@media (max-width: 768px) {
  .modal__panel {
    margin: 0;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
}
