.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1002;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: modalOverlayFadeIn 0.3s ease forwards;

  .modal-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: white;
    padding: 24px;
    width: 100%;
    max-width: 1000px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);

    .modal-header {
      display: flex;
      flex-direction: row;
      align-items: center;

      h1 {
        flex-grow: 1;
        font-size: 24px;
        font-weight: bold;
        margin: 0;
      }

      .close {
        background: none;
        border: none;
        font-size: 24px;
        color: #888;
        cursor: pointer;

        &:hover {
          color: #333;
        }
      }
    }

    .modal-body {
      overflow-y: auto;
      flex-grow: 1;

      &.modal-form {
        display: flex;
        flex-direction: column;
        gap: 16px;

        .title {
          font-size: 18px;
          font-weight: 600;
          line-height: 1.5;

          .description {
            font-size: 14px;
            font-weight: 400;
            color: var(--color-text-tertiary);
          }
        }

        .field_with_errors {
          color: var(--color-fg-error-secondary);
          display: flex;
        }

        .expand {
          width: 100%;
        }

        .actions {
          flex: 1;
          gap: 18px;
        }

        textarea {
          min-height: 82px;
          resize: vertical;
        }
      }
    }
  }
}

@media(max-width: 799px) {
  .modal-overlay {
    .modal-content {
      height: 100%;
    }
  }
}

@media (min-width: 800px) {
  .modal-overlay {
    .modal-content {
      border-radius: 8px;
      min-height: 300px;
      max-height: 600px;
    }
  }
}

@keyframes modalOverlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
